123
Fork of LG by
vibro.h@28:17c84ed091b3, 2016-02-05 (annotated)
- Committer:
- igor_v
- Date:
- Fri Feb 05 23:21:54 2016 +0000
- Revision:
- 28:17c84ed091b3
- Parent:
- 21:bc8c1cec3da6
- Child:
- 33:341521841d3a
1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
igor_v | 0:8ad47e2b6f00 | 1 | #ifndef VIBRO_H |
igor_v | 0:8ad47e2b6f00 | 2 | #define VIBRO_H |
igor_v | 0:8ad47e2b6f00 | 3 | |
igor_v | 21:bc8c1cec3da6 | 4 | #define ClrV1 LPC_GPIO1->FIOSET=(1<<25); |
igor_v | 21:bc8c1cec3da6 | 5 | #define SetV1 LPC_GPIO1->FIOCLR = (1<<25); |
igor_v | 1:f2adcae3d304 | 6 | |
igor_v | 21:bc8c1cec3da6 | 7 | #define ClrV2 LPC_GPIO1->FIOSET = (1<<28); |
igor_v | 21:bc8c1cec3da6 | 8 | #define SetV2 LPC_GPIO1->FIOCLR = (1<<28); |
igor_v | 0:8ad47e2b6f00 | 9 | |
igor_v | 28:17c84ed091b3 | 10 | #define LoopOn LPC_GPIO1->FIOSET = (1<<30); |
igor_v | 28:17c84ed091b3 | 11 | #define LoopOff LPC_GPIO1->FIOCLR = (1<<30); |
igor_v | 28:17c84ed091b3 | 12 | #define StartV1 0 |
igor_v | 28:17c84ed091b3 | 13 | #define StartV2 15 |
igor_v | 0:8ad47e2b6f00 | 14 | #define TIME_INTERVAL (7812) |
igor_v | 0:8ad47e2b6f00 | 15 | |
igor_v | 0:8ad47e2b6f00 | 16 | |
igor_v | 28:17c84ed091b3 | 17 | typedef struct _Gyro{ |
igor_v | 28:17c84ed091b3 | 18 | |
igor_v | 28:17c84ed091b3 | 19 | unsigned int RgConA; |
igor_v | 28:17c84ed091b3 | 20 | unsigned int RgConB; |
igor_v | 28:17c84ed091b3 | 21 | |
igor_v | 28:17c84ed091b3 | 22 | |
igor_v | 28:17c84ed091b3 | 23 | unsigned int Frq; // Непосредственное значение частоты для таймера. |
igor_v | 28:17c84ed091b3 | 24 | unsigned int FrqHZ; // Частота в Гц. |
igor_v | 28:17c84ed091b3 | 25 | unsigned int FrqRate; // Разброс частот при ошумлении. |
igor_v | 28:17c84ed091b3 | 26 | unsigned int FrqMin; // Минимальное значение ошумленной частоты. |
igor_v | 28:17c84ed091b3 | 27 | unsigned int FrqOld; // Значение частоты за прошлый такт. |
igor_v | 28:17c84ed091b3 | 28 | |
igor_v | 28:17c84ed091b3 | 29 | unsigned int Amp; |
igor_v | 28:17c84ed091b3 | 30 | unsigned int AmpL; |
igor_v | 28:17c84ed091b3 | 31 | unsigned int AmpT; |
igor_v | 28:17c84ed091b3 | 32 | unsigned int AmpPer; |
igor_v | 28:17c84ed091b3 | 33 | unsigned int AmpPerDel;//0-100% |
igor_v | 28:17c84ed091b3 | 34 | unsigned int AmpN1; |
igor_v | 28:17c84ed091b3 | 35 | unsigned int AmpN2; |
igor_v | 28:17c84ed091b3 | 36 | unsigned int AmpMin; |
igor_v | 28:17c84ed091b3 | 37 | unsigned int AmpTD; |
igor_v | 28:17c84ed091b3 | 38 | |
igor_v | 28:17c84ed091b3 | 39 | unsigned int CMD_In; |
igor_v | 28:17c84ed091b3 | 40 | unsigned int SOC_Out; |
igor_v | 28:17c84ed091b3 | 41 | unsigned int My_Addres; |
igor_v | 28:17c84ed091b3 | 42 | unsigned int GLD_Serial; |
igor_v | 28:17c84ed091b3 | 43 | unsigned int CRC; |
igor_v | 28:17c84ed091b3 | 44 | unsigned int Firmware_Version; |
igor_v | 28:17c84ed091b3 | 45 | unsigned int RsErrLine; |
igor_v | 28:17c84ed091b3 | 46 | |
igor_v | 28:17c84ed091b3 | 47 | unsigned int Cnt_Pls; |
igor_v | 28:17c84ed091b3 | 48 | unsigned int Cnt_Mns; |
igor_v | 28:17c84ed091b3 | 49 | unsigned int Cnt_Dif; |
igor_v | 28:17c84ed091b3 | 50 | unsigned int T_Vib; |
igor_v | 28:17c84ed091b3 | 51 | unsigned int F_ras; |
igor_v | 28:17c84ed091b3 | 52 | }GyroT, *Gyro_p; |
igor_v | 28:17c84ed091b3 | 53 | |
igor_v | 28:17c84ed091b3 | 54 | |
igor_v | 28:17c84ed091b3 | 55 | extern GyroT Gyro; |
igor_v | 28:17c84ed091b3 | 56 | |
igor_v | 28:17c84ed091b3 | 57 | |
igor_v | 0:8ad47e2b6f00 | 58 | |
igor_v | 21:bc8c1cec3da6 | 59 | extern unsigned int init_Vibro (); |
igor_v | 0:8ad47e2b6f00 | 60 | extern void cheng(void); |
igor_v | 0:8ad47e2b6f00 | 61 | extern void Noise(void); |
igor_v | 0:8ad47e2b6f00 | 62 | extern void VibroOut(void); |
igor_v | 0:8ad47e2b6f00 | 63 | |
igor_v | 0:8ad47e2b6f00 | 64 | extern int Pulse_midl ; |
igor_v | 0:8ad47e2b6f00 | 65 | extern struct VIBRO Vib; |
igor_v | 0:8ad47e2b6f00 | 66 | extern int PulseHalf; |
igor_v | 28:17c84ed091b3 | 67 | extern int CuruAngle; |
igor_v | 0:8ad47e2b6f00 | 68 | extern unsigned int FrecTemp; |
igor_v | 0:8ad47e2b6f00 | 69 | #endif |
igor_v | 0:8ad47e2b6f00 | 70 |