##// END OF EJS Templates
First Init
First Init

File last commit:

r0:aa6c4da24f03 default
r0:aa6c4da24f03 default
Show More
main.c
48 lines | 1.1 KiB | text/x-c | CLexer
#include <stdio.h>
#include <grlib_regs.h>
#include <stdint.h>
#include <LFR.h>
#include <wfp.h>
#define MS_Size_Int (128 * 25 * 4 / sizeof(int))
#define BUF_SZ 2688
uint16_t WF1[6 * BUF_SZ] __attribute__((aligned(0x100)));
uint16_t WF2[6 * BUF_SZ] __attribute__((aligned(0x100)));
volatile int todo = 0;
volatile int Freq = 0;
volatile int PerformReset = 1;
volatile int Major;
volatile int Minor;
volatile int Board;
int main(void) {
Major = LFR->VERSION.Major;
Minor = LFR->VERSION.Minor;
Board = LFR->VERSION.Board;
while (1)
{
do{
if(PerformReset)
resetLFR();
switch (Freq)
{
case 0:
getSnapShotsF0((uint32_t)WF1,(uint32_t)WF2,BUF_SZ,0);
break;
case 1:
getSnapShotsF1((uint32_t)WF1,(uint32_t)WF2,BUF_SZ,0);
break;
case 2:
getSnapShotsF2((uint32_t)WF1,(uint32_t)WF2,BUF_SZ,0);
break;
default:
break;
}
todo--;
}while (todo!=0);
}
return 0;
}