![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: vibro.h
- Revision:
- 30:17c84ed091b3
- Parent:
- 21:bc8c1cec3da6
- Child:
- 33:341521841d3a
--- a/vibro.h Fri Feb 05 08:02:55 2016 +0000 +++ b/vibro.h Fri Feb 05 23:21:54 2016 +0000 @@ -1,62 +1,60 @@ #ifndef VIBRO_H #define VIBRO_H -/* -#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 ClrV1 LPC_GPIO1->FIOSET=(1<<25); #define SetV1 LPC_GPIO1->FIOCLR = (1<<25); #define ClrV2 LPC_GPIO1->FIOSET = (1<<28); #define SetV2 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 LoopOn LPC_GPIO1->FIOSET = (1<<30); +#define LoopOff LPC_GPIO1->FIOCLR = (1<<30); +#define StartV1 0 +#define StartV2 15 #define TIME_INTERVAL (7812) - struct MAIN { - - unsigned int RgConA; - unsigned int RgConB; - - - unsigned int Frq; // Непосредственное значение частоты для таймера. - unsigned int FrqHZ; // Частота в Гц. - unsigned int FrqRate; // Разброс частот при ошумлении. - unsigned int FrqMin; // Минимальное значение ошумленной частоты. - unsigned int FrqOld; // Значение частоты за прошлый такт. - - unsigned int Amp; - unsigned int AmpL; - unsigned int AmpT; - unsigned int AmpPer; - unsigned int AmpPerDel;//0-100% - unsigned int AmpN1; - unsigned int AmpN2; - unsigned int AmpMin; - unsigned int AmpTD; - - unsigned int CMD_In; - unsigned int SOC_Out; - unsigned int My_Addres; - unsigned int GLD_Serial; - unsigned int CRC; - unsigned int Firmware_Version; - unsigned int RsErrLine; - - unsigned int Cnt_Pls; - unsigned int Cnt_Mns; - unsigned int Cnt_Dif; - unsigned int T_Vib; - unsigned int F_ras; -}; -extern struct MAIN Main; +typedef struct _Gyro{ + + unsigned int RgConA; + unsigned int RgConB; + + + unsigned int Frq; // Непосредственное значение частоты для таймера. + unsigned int FrqHZ; // Частота в Гц. + unsigned int FrqRate; // Разброс частот при ошумлении. + unsigned int FrqMin; // Минимальное значение ошумленной частоты. + unsigned int FrqOld; // Значение частоты за прошлый такт. + + unsigned int Amp; + unsigned int AmpL; + unsigned int AmpT; + unsigned int AmpPer; + unsigned int AmpPerDel;//0-100% + unsigned int AmpN1; + unsigned int AmpN2; + unsigned int AmpMin; + unsigned int AmpTD; + + unsigned int CMD_In; + unsigned int SOC_Out; + unsigned int My_Addres; + unsigned int GLD_Serial; + unsigned int CRC; + unsigned int Firmware_Version; + unsigned int RsErrLine; + + unsigned int Cnt_Pls; + unsigned int Cnt_Mns; + unsigned int Cnt_Dif; + unsigned int T_Vib; + unsigned int F_ras; +}GyroT, *Gyro_p; + + +extern GyroT Gyro; + + extern unsigned int init_Vibro (); extern void cheng(void); @@ -66,7 +64,7 @@ extern int Pulse_midl ; extern struct VIBRO Vib; extern int PulseHalf; -extern int CuruAngle; +extern int CuruAngle; extern unsigned int FrecTemp; #endif