OSDN Git Service

[General][EEPROM] Use structure to compress object-size.
[openi2cradio/OpenI2CRadio.git] / power.c
diff --git a/power.c b/power.c
index fe3cad6..377fe01 100644 (file)
--- a/power.c
+++ b/power.c
@@ -113,7 +113,7 @@ void rfamp_power(unsigned char b)
 
 }
 
-volatile unsigned char chk_powerbutton(void)
+unsigned char chk_powerbutton(void)
 {
     unsigned char count = 0;
     char i;
@@ -130,12 +130,7 @@ volatile unsigned char chk_powerbutton(void)
 
 void shutdown(unsigned char save)
 {
-//    _CLS();
- //   _LOCATE(0,0);
-//    printstr("Bye...");
-//    idle_time_ms(1500); // 1.5Sec
     rfamp_power(RFAMP_OFF);
-//    _CLS();
     acm1602_suspend(LCD_I2CADDR);
     power_off(save);
 }
@@ -159,13 +154,6 @@ void power_off(unsigned char save)
         IOCB = 0x10; // IOCB4 ONLY.
         OSCCONbits.IDLEN = 0; // Not Idle.
         INTCON2bits.RBIP = 1; // Priority = HIGH;
-        //INTCONbits.GIE = 0;
-        //INTCONbits.RBIF = 0;
-        //INTCONbits.PEIE = 0;
-
-        //INTCONbits.TMR0IF = 0;
-        //INTCONbits.TMR0IE = 0;
-        //INTCONbits.RBIE = 1;
         INTCON = 0b0000100;
         T0CONbits.TMR0ON = 0;
         Sleep();
@@ -178,12 +166,6 @@ void power_off(unsigned char save)
     
     INTCONbits.RBIE = 0;
     INTCONbits.RBIF = 0;
-//    OSCCONbits.IDLEN = 1; // Not Idle.
-
-//    INTCONbits.GIE = 1;
-//    INTCONbits.PEIE = 1;
-//    WDTCONbits.SWDTEN = 1; //WDT ON.
-
     // Button pressed, software reset.
     Reset();
 }
\ No newline at end of file