Dmitry Kovalev
/
LG2
fork
Fork of LG by
Diff: vibro.h
- Revision:
- 104:ab1cb4ff56b2
- Parent:
- 103:e96f08947def
- Child:
- 106:250ddd8629c6
--- a/vibro.h Wed Mar 30 14:20:03 2016 +0000 +++ b/vibro.h Thu Mar 31 10:16:56 2016 +0000 @@ -54,13 +54,28 @@ unsigned int Cnt_Dif; unsigned int T_Vib; unsigned int F_ras; - + + +#define FrqOff Gyro.RgConA &= ~AFRQ; //установить бит светодиода в "0" +#define FrqON Gyro.RgConA |= AFRQ; //установить бит светодиода в "1" + +#define HFOOFF Gyro.RgConA &= ~AHFO; //установить бит светодиода в "0" +#define HFOON Gyro.RgConA |= AHFO; //установить бит светодиода в "1" + +#define PlcOFF Gyro.RgConA &= ~APLC; //установить бит светодиода в "0" +#define PlcON Gyro.RgConA |= APLC; //установить бит светодиода в "1" + +#define AFRQ (1<<0) +#define AHFO (1<<1) +#define APLC (1<<2) unsigned int PinReg; // bit5 bit4 bit 3 bit1 bit0 unsigned int PinRegOld; // || светодиод || состояние поджига || состояние подсветки || состояние вибро 2 || состояние вибро 1 || #define LedOFF Gyro.PinReg &= ~PinRegBitLED; //установить бит светодиода в "0" #define LedON Gyro.PinReg |= PinRegBitLED; //установить бит светодиода в "1" + + #define PinRegBitTXE (1<<5) #define PinRegBitLED (1<<4) #define PinRegBitD (1<<3)