Dmitry Kovalev
/
LGstaandart
forkd
Fork of LG2 by
pin.c
- Committer:
- Kovalev_D
- Date:
- 2016-02-04
- Revision:
- 28:1c9acd3b224d
- Child:
- 33:341521841d3a
File content as of revision 28:1c9acd3b224d:
#include "Global.h" void PinDiscarg(void) { /* unsigned int temp; temp = ((Main.Discharg & 0x1)<<4); temp = temp<<4 ;*/ Main.PinReg |= ((Main.Discharg & 0x1)<<4); Main.Discharg=Main.Discharg>>1; } void PinCheng(void) { unsigned int vib1, vib2, discarg, Light; unsigned int error; if((Main.PinReg & PinRegBitD) != (Main.PinRegOld & PinRegBitD)) { if(Main.PinReg & PinRegBitD) LightUpON else LightUpOFF } if((Main.PinReg & PinRegBitD) != (Main.PinRegOld & PinRegBitD)) { if(Main.PinReg & PinRegBitD) LightUpON else LightUpOFF } Main.PinRegOld = Main.PinReg; if(Main.PinReg!=Main.PinRegOld) { vib1 = Main.PinReg & 0x1; vib2 = Main.PinReg & 0x2; Light = Main.PinReg & 0x4; discarg = Main.PinReg & 0x8; if(vib1) { SetV1 } else ClrV1 if(vib2) { SetV2 } else ClrV2 if(Light) { BackLightON } else { BackLightOFF } if(discarg) { LightUpON } else { LightUpOFF } } else {} }