![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
vibro.h@26:52ce5953a5c2, 2016-02-04 (annotated)
- Committer:
- Kovalev_D
- Date:
- Thu Feb 04 08:41:24 2016 +0000
- Revision:
- 26:52ce5953a5c2
- Parent:
- 21:bc8c1cec3da6
- Child:
- 28:1c9acd3b224d
? ????????? Main. ????????? 4 ???????? (????????? ??? ??????? ? ??????? , ??????? ?????????????????? ?????????, ??????? ?????????????????? ...
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 | /* |
igor_v | 21:bc8c1cec3da6 | 5 | #define SetV1 LPC_GPIO1->FIOSET = (1<<25); |
igor_v | 21:bc8c1cec3da6 | 6 | #define ClrV1 LPC_GPIO1->FIOCLR = (1<<25); |
igor_v | 21:bc8c1cec3da6 | 7 | #define SetV2 LPC_GPIO1->FIOSET = (1<<28); |
igor_v | 21:bc8c1cec3da6 | 8 | #define ClrV2 LPC_GPIO1->FIOCLR = (1<<28); |
igor_v | 21:bc8c1cec3da6 | 9 | */ |
igor_v | 21:bc8c1cec3da6 | 10 | #define ClrV1 LPC_GPIO1->FIOSET=(1<<25); |
igor_v | 21:bc8c1cec3da6 | 11 | #define SetV1 LPC_GPIO1->FIOCLR = (1<<25); |
igor_v | 1:f2adcae3d304 | 12 | |
igor_v | 21:bc8c1cec3da6 | 13 | #define ClrV2 LPC_GPIO1->FIOSET = (1<<28); |
igor_v | 21:bc8c1cec3da6 | 14 | #define SetV2 LPC_GPIO1->FIOCLR = (1<<28); |
igor_v | 0:8ad47e2b6f00 | 15 | |
Kovalev_D | 26:52ce5953a5c2 | 16 | #define LoopOn LPC_GPIO1->FIOSET = (1<<30); |
Kovalev_D | 26:52ce5953a5c2 | 17 | #define LoopOff LPC_GPIO1->FIOCLR = (1<<30); |
Kovalev_D | 26:52ce5953a5c2 | 18 | #define StartV1 0 |
Kovalev_D | 26:52ce5953a5c2 | 19 | #define StartV2 15 |
igor_v | 0:8ad47e2b6f00 | 20 | #define TIME_INTERVAL (7812) |
igor_v | 0:8ad47e2b6f00 | 21 | |
igor_v | 0:8ad47e2b6f00 | 22 | |
Kovalev_D | 26:52ce5953a5c2 | 23 | struct MAIN { |
Kovalev_D | 26:52ce5953a5c2 | 24 | |
Kovalev_D | 26:52ce5953a5c2 | 25 | unsigned int RgConA; |
Kovalev_D | 26:52ce5953a5c2 | 26 | unsigned int RgConB; |
Kovalev_D | 26:52ce5953a5c2 | 27 | |
Kovalev_D | 26:52ce5953a5c2 | 28 | |
Kovalev_D | 26:52ce5953a5c2 | 29 | unsigned int Frq; // Непосредственное значение частоты для таймера. |
Kovalev_D | 26:52ce5953a5c2 | 30 | unsigned int FrqHZ; // Частота в Гц. |
Kovalev_D | 26:52ce5953a5c2 | 31 | unsigned int FrqRate; // Разброс частот при ошумлении. |
Kovalev_D | 26:52ce5953a5c2 | 32 | unsigned int FrqMin; // Минимальное значение ошумленной частоты. |
Kovalev_D | 26:52ce5953a5c2 | 33 | unsigned int FrqOld; // Значение частоты за прошлый такт. |
Kovalev_D | 26:52ce5953a5c2 | 34 | |
Kovalev_D | 26:52ce5953a5c2 | 35 | unsigned int Amp; |
Kovalev_D | 26:52ce5953a5c2 | 36 | unsigned int AmpL; |
Kovalev_D | 26:52ce5953a5c2 | 37 | unsigned int AmpT; |
Kovalev_D | 26:52ce5953a5c2 | 38 | unsigned int AmpPer; |
Kovalev_D | 26:52ce5953a5c2 | 39 | unsigned int AmpPerDel;//0-100% |
Kovalev_D | 26:52ce5953a5c2 | 40 | unsigned int AmpN1; |
Kovalev_D | 26:52ce5953a5c2 | 41 | unsigned int AmpN2; |
Kovalev_D | 26:52ce5953a5c2 | 42 | unsigned int AmpMin; |
Kovalev_D | 26:52ce5953a5c2 | 43 | unsigned int AmpTD; |
Kovalev_D | 26:52ce5953a5c2 | 44 | |
Kovalev_D | 26:52ce5953a5c2 | 45 | unsigned int CMD_In; |
Kovalev_D | 26:52ce5953a5c2 | 46 | unsigned int SOC_Out; |
Kovalev_D | 26:52ce5953a5c2 | 47 | unsigned int My_Addres; |
Kovalev_D | 26:52ce5953a5c2 | 48 | unsigned int GLD_Serial; |
Kovalev_D | 26:52ce5953a5c2 | 49 | unsigned int CRC; |
Kovalev_D | 26:52ce5953a5c2 | 50 | unsigned int Firmware_Version; |
Kovalev_D | 26:52ce5953a5c2 | 51 | unsigned int RsErrLine; |
Kovalev_D | 26:52ce5953a5c2 | 52 | |
Kovalev_D | 26:52ce5953a5c2 | 53 | unsigned int Cnt_Pls; |
Kovalev_D | 26:52ce5953a5c2 | 54 | unsigned int Cnt_Mns; |
Kovalev_D | 26:52ce5953a5c2 | 55 | unsigned int Cnt_Dif; |
Kovalev_D | 26:52ce5953a5c2 | 56 | unsigned int T_Vib; |
Kovalev_D | 26:52ce5953a5c2 | 57 | unsigned int F_ras; |
Kovalev_D | 26:52ce5953a5c2 | 58 | |
Kovalev_D | 26:52ce5953a5c2 | 59 | unsigned int PinReg // bit4 bit 3 bit1 bit0 |
Kovalev_D | 26:52ce5953a5c2 | 60 | unsigned int PinRegOld // || bit5 || состояние поджига || состояние подсветки || состояние вибро 2 || состояние вибро 1 || |
Kovalev_D | 26:52ce5953a5c2 | 61 | |
Kovalev_D | 26:52ce5953a5c2 | 62 | unsigned int Discharg // последовательность бит харрактеризующая ворму сигнала поджига. |
Kovalev_D | 26:52ce5953a5c2 | 63 | unsigned int BackLight // последовательность бит харрактеризующая ворму сигнала подсветки. |
Kovalev_D | 26:52ce5953a5c2 | 64 | |
igor_v | 0:8ad47e2b6f00 | 65 | }; |
igor_v | 0:8ad47e2b6f00 | 66 | extern struct MAIN Main; |
igor_v | 0:8ad47e2b6f00 | 67 | |
igor_v | 21:bc8c1cec3da6 | 68 | extern unsigned int init_Vibro (); |
igor_v | 0:8ad47e2b6f00 | 69 | extern void cheng(void); |
igor_v | 0:8ad47e2b6f00 | 70 | extern void Noise(void); |
igor_v | 0:8ad47e2b6f00 | 71 | extern void VibroOut(void); |
igor_v | 0:8ad47e2b6f00 | 72 | |
igor_v | 0:8ad47e2b6f00 | 73 | extern int Pulse_midl ; |
igor_v | 0:8ad47e2b6f00 | 74 | extern struct VIBRO Vib; |
igor_v | 0:8ad47e2b6f00 | 75 | extern int PulseHalf; |
igor_v | 0:8ad47e2b6f00 | 76 | extern int CuruAngle; |
igor_v | 0:8ad47e2b6f00 | 77 | extern unsigned int FrecTemp; |
igor_v | 0:8ad47e2b6f00 | 78 | #endif |
igor_v | 0:8ad47e2b6f00 | 79 |