![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
Diff: host/Source/App/Parameters.h
- Revision:
- 23:12e6183f04d4
diff -r bc8c1cec3da6 -r 12e6183f04d4 host/Source/App/Parameters.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/host/Source/App/Parameters.h Wed Feb 03 10:44:42 2016 +0300 @@ -0,0 +1,57 @@ +#ifndef UHOST +#define UHOST +/*e.**************************************************** +* Constants for the uHost card * +********************************************************/ +/*r.**************************************************** +* Êîíñòàíòû äëÿ ïëàòû uHost * +********************************************************/ +/*e. file for the C code */ +/*r. ôàéë äëÿ êîäà íà Ñ */ + +#define FIRMWARE_VER 0x00 //e. firmware version number //r. íîìåð âåðñèè ìèêðîïðîãðàììû + + //e. ====================== registers of the system controller of the DSP card ================ //r. ====================== ðåãèñòðû ñèñòåìíîãî êîíòðîëëåðà ïëàòû DSP ================ +#define Sys_RgE 0x07fb //e. the line1_err register of line errors //r. ðåãèñòð îøèáîê ëèíèè line1_err +#define Sys_RgR 0x07fc //e. the register of a mode of the system (only write) //r. ðåãèñòð ðåæèìà ñèñòåìû (òîëüêî çàïèñü) +#define Sys_RgS 0x07fc //e. the register of a status of the system (only read) //r. ðåãèñòð ñòàòóñà ñèñòåìû (òîëüêî ÷òåíèå) +#define Trm_data 0x07fd //e. the data stack of the transmitter //r. ñòåê äàííûõ ïåðåäàò÷èêà +#define Rcv_data 0x07fd //e. the data stack of the receiver //r. ñòåê äàííûõ ïðèåìíèêà +#define Rcv_cntr 0x07fe //e. the counter of the received bytes //r. ñ÷åò÷èê ïðèíÿòûõ áàéò ïðèåìíèêà + + //e. ====================== bits of the Sys_RgS status register ========================= //r. ====================== áèòû ðåãèñòðà ñîñòîÿíèÿ Sys_RgS ========================= +#define RCV_RDY_MASK 0x0040 //e. a mask of the readiness bit of the receiver //r. ìàñêà áèòà ãîòîâíîñòè ïðèåìíèêà +#define RCV_FERR_MASK 0x0020 //e. a mask of the "format error" bit //r. ìàñêà áèòà "îøèáêà ôîðìàòà" +#define RCV_TOUT_MASK 0x0010 //e. a mask of the "time-out" bit //r. ìàñêà áèòà "òàéì-àóò" +#define RCV_RFUL_MASK 0x0008 //e. a mask of the "stack is full" bit//r. ìàñêà áèòà "ñòåê ïîëîí" +#define RCV_FERR 0x0020 //e. a mask of the "format error" bit //r. ìàñêà áèòà "îøèáêà ôîðìàòà" +#define RCV_TOUT 0x0010 //e. a mask of the "time-out" bit //r. ìàñêà áèòà "òàéì-àóò" +#define RCV_RFUL 0x0008 //e. a mask of the "stack is full" bit//r. ìàñêà áèòà "ñòåê ïîëîí" + +#define INT_ERR_TC 0x00000008 + +#define FromFLASH 0x00003 +#define ByDefault 0x00001 + + + + +#define SetV1 LPC_GPIO1->FIOSET=(1<<25); +#define ClrV1 LPC_GPIO1->FIOCLR = (1<<25); +#define SetV2 LPC_GPIO1->FIOSET = (1<<28); +#define ClrV2 LPC_GPIO1->FIOCLR = (1<<28); +#define LoopOn LPC_GPIO1->FIOSET = (1<<30); +#define LoopOff LPC_GPIO1->FIOCLR = (1<<30); +#define StartV1 0 +#define StartV2 15 +#define TIME_INTERVAL (7812) + + + +extern uint32_t blt_in_test; + +void LoadFlashParam(unsigned ); +void FlashDMA_Init(void); +void init_DefaultParam(void); +#endif +