forkd

Dependencies:   mbed

Fork of LG2 by Dmitry Kovalev

Committer:
Kovalev_D
Date:
Wed Feb 03 10:44:42 2016 +0300
Revision:
23:12e6183f04d4
[thyz

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kovalev_D 23:12e6183f04d4 1 extern unsigned int Err;
Kovalev_D 23:12e6183f04d4 2 extern unsigned int ParamIn;
Kovalev_D 23:12e6183f04d4 3 extern unsigned int Rate_Flag;
Kovalev_D 23:12e6183f04d4 4 #define SOC_In 0xCC //e. attribute of command //r. ïðèçíàê êîìàíäû
Kovalev_D 23:12e6183f04d4 5 //#define SOC_Out 0xDD
Kovalev_D 23:12e6183f04d4 6 #define BROADCAST_ADDRESS 0x1f //e. the broadcasting address ( shared for 3 GLD ) //r. øèðîêîâåùàòåëüíûé àäðåñ (îáùèé äëÿ 3-õ ÃËÄ)
Kovalev_D 23:12e6183f04d4 7
Kovalev_D 23:12e6183f04d4 8
Kovalev_D 23:12e6183f04d4 9 #define CMD_DELTA_PS 0xa000 //e. the code of the B_DeltaPS command //r. êîä êîìàíäû B_DeltaPS
Kovalev_D 23:12e6183f04d4 10 #define CMD_DELTA_BINS 0xb000 //e. the code of the B_DeltaBINS command //r. êîä êîìàíäû B_DeltaBINS
Kovalev_D 23:12e6183f04d4 11 #define CMD_DELTA_SF 0xb200 //e. the code of the B_DeltaSF command //r. êîä êîìàíäû B_DeltaSF
Kovalev_D 23:12e6183f04d4 12 #define CMD_DEV_MODE 0xA500 //e. the code of the Device_Mode command //r. êîä êîìàíäû Device_Mode
Kovalev_D 23:12e6183f04d4 13 #define CMD_BIT_MODE 0xA700 //e. the code of the B.I.T. command //r. êîä êîìàíäû B.I.T.(âñòîðîåííîãî òåñòèðîâàíèÿ)
Kovalev_D 23:12e6183f04d4 14 #define CMD_RATE 0x0000 //e. the code of the Rate command //r. êîä êîìàíäû Rate
Kovalev_D 23:12e6183f04d4 15 #define CMD_DELTA 0x0f00 //e. the code of the Delta command //r. êîä êîìàíäû Delta
Kovalev_D 23:12e6183f04d4 16 #define CMD_D_PERIOD_W 0xf000 //e. the code of the D_Period_W command //r. êîä êîìàíäû D_Period_W
Kovalev_D 23:12e6183f04d4 17
Kovalev_D 23:12e6183f04d4 18 #define CMD_MAINT 0x99 //e. the code of the Maintenance mode command //r. êîä êîìàíäû Maintenance mode
Kovalev_D 23:12e6183f04d4 19
Kovalev_D 23:12e6183f04d4 20 #define SUBCMD_M_STIMUL 0x0a00 //e. the code of the Stimul command //r. êîä êîìàíäû Stimul
Kovalev_D 23:12e6183f04d4 21 #define SUBCMD_M_RESET 0x8000 //e. software device reset(restart) //r. ïðîãðàììíûé ñáðîñ (ðåñòàðò) ïðèáîðà
Kovalev_D 23:12e6183f04d4 22 #define SUBCMD_M_CLEAR 0xda00 //e. reset of the register of errors of line 485 //r. î÷èñòêà ðåãèñòðà îøèáîê ëèíèè 485
Kovalev_D 23:12e6183f04d4 23 #define SUBCMD_M_MIRR 0xda01 //e. return previous contents of the receiver buffer //r. âîçâðàò ïðåäûäóùåãî ñîäåðæèìîãî áóôåðà ïðèåìíèêà
Kovalev_D 23:12e6183f04d4 24 #define SUBCMD_M_LDPAR_F 0xda02 //e. load GLD parameters from Flash-memory //r. çàãðóçèòü ïàðàìåòðû ÃËÄ èç ôëýø-ïàìÿòè
Kovalev_D 23:12e6183f04d4 25 #define SUBCMD_M_LDPAR_D 0xda03 //e. set GLD parameters by procedure of initialization //r. óñòàíîâèòü ïàðàìåòðû ÃËÄ ïðîöåäóðîé èíèöèàëèçàöèè
Kovalev_D 23:12e6183f04d4 26 #define SUBCMD_M_START 0xda04 //e. switch on the GLD //r. âêëþ÷èòü ÃËÄ
Kovalev_D 23:12e6183f04d4 27 #define SUBCMD_M_STOP 0xda40 //e. switch off the GLD //r. âûêëþ÷èòü ÃËÄ
Kovalev_D 23:12e6183f04d4 28 #define SUBCMD_M_PULSE 0xda0a //e. generation of the light-up pulse //r. ãåíåðàöèÿ èìïóëüñà ïîäæèãà
Kovalev_D 23:12e6183f04d4 29
Kovalev_D 23:12e6183f04d4 30 #define SUBCMD_M_CTL_R 0xd900 //e. reading the control register of the device //r. ÷òåíèå ðåãèñòðà óïðàâëåíèÿ óñòðîéñòâà
Kovalev_D 23:12e6183f04d4 31 #define SUBCMD_M_CTL_M 0xd800 //e. modification of bit of the control register //r. ìîäèôèêàöèÿ áèòà ðåãèñòðà óïðàâëåíèÿ
Kovalev_D 23:12e6183f04d4 32 #define SUBCMD_M_RATE 0xdd00 //e. delivery of a stack of parameters M_Rate (Rate2, Rate3) //r. âûäà÷à íàáîðà ïàðàìåòðîâ M_Rate (Rate2, Rate3)
Kovalev_D 23:12e6183f04d4 33
Kovalev_D 23:12e6183f04d4 34 #define SUBCMD_M_TMP_W 0xe000 //e. writing to the AD7714 circuit (temperature sensors) //r. çàïèñü â ñõåìû AD7714 (èçìåðèòåëè òåìïåðàòóðû)
Kovalev_D 23:12e6183f04d4 35 #define SUBCMD_M_TMP_R 0xe100 //e. reading from the AD7714 circuit (temperature sensors) //r. ÷òåíèå èç ñõåì AD7714 (èçìåðèòåëè òåìïåðàòóðû)
Kovalev_D 23:12e6183f04d4 36 #define SUBCMD_M_E5R_W 0xe200 //e. writing to the register of a mode of the Elio5 card //r. çàïèñü â ðåãèñòð ðåæèìà ïëàòû Elio5
Kovalev_D 23:12e6183f04d4 37 #define SUBCMD_M_ADC_R 0xe300 //e. reading data from the ADC of the Elio5 card //r. ÷òåíèå äàííûõ èç ÀÖÏ ïëàòû Elio5
Kovalev_D 23:12e6183f04d4 38 #define SUBCMD_M_VIB_W 0xe400 //e. loading of the oscillation period of the dither drive //r. çàãðóçêà ïåðèîäà êîëåáàíèé âèáðîïðèâîäà
Kovalev_D 23:12e6183f04d4 39 #define SUBCMD_M_CNT_R 0xe500 //e. reading data from the counters of the Elio5 card //r. ÷òåíèå äàííûõ èç ñ÷åò÷èêîâ ïëàòû Elio5
Kovalev_D 23:12e6183f04d4 40 #define SUBCMD_M_GPH_W 0xe600 //e. loading gain factors of photodetector channels //r. çàãðóçêà êîýôôèöèåíòîâ óñèëåíèÿ êàíàëîâ ôîòîïðèåìíèêà
Kovalev_D 23:12e6183f04d4 41 #define SUBCMD_M_FLG_R 0xe700 //e. reading data from the register of input flags //r. ÷òåíèå äàííûõ èç ðåãèñòðà âõîäíûõ ôëàãîâ
Kovalev_D 23:12e6183f04d4 42 #define SUBCMD_M_PARAM_W 0xe800 //e. writing working parameter to the data memory //r. çàïèñü ðàáî÷åãî ïàðàìåòðà â ïàìÿòü äàííûõ
Kovalev_D 23:12e6183f04d4 43 #define SUBCMD_M_PARAM_R 0xe900 //e. reading working parameter of the GLD from the data memory //r. ÷òåíèå ðàáî÷åãî ïàðàìåòðà GLD èç ïàìÿòè äàííûõ
Kovalev_D 23:12e6183f04d4 44 #define SUBCMD_M_E5RA_W 0xea00 //e. writing in 1st additional (A) register of a mode of the Elio5 card //r. çàïèñü â 1-ûé äîïîëíèòåëüíûé (À) ðåãèñòð ðåæèìà ïëàòû Elio5
Kovalev_D 23:12e6183f04d4 45 void Read_CMD(void);
Kovalev_D 23:12e6183f04d4 46 unsigned int Check(char *c, unsigned int Count);
Kovalev_D 23:12e6183f04d4 47 void CMD_Rate(void);