Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LG by
pin.c
00001 #include "Global.h" 00002 00003 void PinDiscarg(void) 00004 { 00005 /* unsigned int temp; 00006 temp = ((Main.Discharg & 0x1)<<4); 00007 temp = temp<<4 ;*/ 00008 Main.PinReg |= ((Main.Discharg & 0x1)<<4); 00009 Main.Discharg=Main.Discharg>>1; 00010 } 00011 00012 00013 void PinCheng(void) 00014 { 00015 unsigned int vib1, vib2, discarg, Light; 00016 unsigned int error; 00017 00018 if((Main.PinReg & PinRegBitD) != (Main.PinRegOld & PinRegBitD)) 00019 00020 { 00021 if(Main.PinReg & PinRegBitD) LightUpON else LightUpOFF 00022 00023 } 00024 00025 if((Main.PinReg & PinRegBitD) != (Main.PinRegOld & PinRegBitD)) 00026 00027 { 00028 if(Main.PinReg & PinRegBitD) LightUpON else LightUpOFF 00029 00030 } 00031 00032 00033 00034 Main.PinRegOld = Main.PinReg; 00035 00036 00037 if(Main.PinReg!=Main.PinRegOld) 00038 00039 { 00040 vib1 = Main.PinReg & 0x1; 00041 vib2 = Main.PinReg & 0x2; 00042 Light = Main.PinReg & 0x4; 00043 discarg = Main.PinReg & 0x8; 00044 00045 if(vib1) { 00046 SetV1 00047 } else ClrV1 00048 00049 if(vib2) { 00050 SetV2 00051 } else ClrV2 00052 00053 if(Light) { 00054 BackLightON 00055 } else { 00056 BackLightOFF 00057 } 00058 00059 if(discarg) { 00060 LightUpON 00061 } else { 00062 LightUpOFF 00063 } 00064 } else {} 00065 }
Generated on Tue Jul 12 2022 15:16:11 by
1.7.2
