123
Fork of LG by
pin.c
- Committer:
- igor_v
- Date:
- 2016-02-06
- Revision:
- 33:341521841d3a
- Parent:
- 31:1c9acd3b224d
- Child:
- 40:8a6494f61326
File content as of revision 33:341521841d3a:
#include "Global.h" void PinDiscarg(void) { /* unsigned int temp; temp = ((Gyro.Discharg & 0x1)<<4); temp = temp<<4 ;*/ Gyro.PinReg |= ((Gyro.Discharg & 0x1)<<4); Gyro.Discharg=Gyro.Discharg>>1; } void PinCheng(void) { unsigned int vib1, vib2, discarg, Light; unsigned int error; if((Gyro.PinReg & PinRegBitD) != (Gyro.PinRegOld & PinRegBitD)) { if(Gyro.PinReg & PinRegBitD) LightUpON else LightUpOFF } if((Gyro.PinReg & PinRegBitD) != (Gyro.PinRegOld & PinRegBitD)) { if(Gyro.PinReg & PinRegBitD) LightUpON else LightUpOFF } Gyro.PinRegOld = Gyro.PinReg; if(Gyro.PinReg!=Gyro.PinRegOld) { vib1 = Gyro.PinReg & 0x1; vib2 = Gyro.PinReg & 0x2; Light = Gyro.PinReg & 0x4; discarg = Gyro.PinReg & 0x8; if(vib1) { SetV1 } else ClrV1 if(vib2) { SetV2 } else ClrV2 if(Light) { BackLightON } else { BackLightOFF } if(discarg) { LightUpON } else { LightUpOFF } } else {} }