OSDN Git Service

[UI][DISP][v1.0] Refine display, printstr().
[openi2cradio/OpenI2CRadio.git] / ioports.c
index 1301222..c2ac324 100644 (file)
--- a/ioports.c
+++ b/ioports.c
@@ -27,6 +27,7 @@
 #include "commondef.h"
 #include "ioports.h"
 #include <signal.h>
+#include "backlight.h"
 
 unsigned char statecount;
 
@@ -70,31 +71,6 @@ void set_powerlamp(unsigned char f)
     }
 }
 
-
-void TMR3_set(void)
-{
-    TMR3L = 1000 & 0xff;
-    TMR3H = 1000 >> 8;
-    T3CONbits.TMR3ON = 1;
-}
-
-void io_intcountinit(void)
-{
-    statecount = 0;
-    T3CON = 0b10001100; // TMR3 = 16bit, CCP is not use TMR3, Prescaler=1:2(1uS)
-                        // DO-not-use SYNC, Internal clock, TMR3 temporally off.
-    PIR2bits.TMR3IF = 0;
-    PIE2bits.TMR3IE = 1;
-    IPR2bits.TMR3IP = 0; // Low priority.
-    INTCONbits.PEIE = 1;
-    RCONbits.IPEN = 0;
-    TMR3L = 0;
-    TMR3H = 0;
-    TMR3_set();
-}
-
-
-
 #if defined(pic18f23k22) || defined(pic18f24k22) || defined(pic18f25k22) || defined(pic18f26k22) || \
     defined(_18F23K22)  || defined(_18F24K22)  || defined(_18F25K22)  || defined(_18F26K22)
 
@@ -120,7 +96,6 @@ void keyin_ioinit(void)
     ANSELC = AN_C_VAL;
     TRISC = TRIS_C_VAL_O;
  //   lcd_backlightinit();
-//    io_intcountinit();
 }
 #endif
 
@@ -148,7 +123,6 @@ void keyin_ioinit(void)
     LATC = 0x00;
     TRISC = TRIS_C_VAL_O;
 //    lcd_backlightinit();
-    io_intcountinit();
 }
 #endif
 
@@ -194,7 +168,6 @@ void keyin_ioinit(void)
     INTCON3bits.INT2IE = 0;
 
 //    lcd_backlightinit();
-    io_intcountinit();
 }
 #else
 void keyin_ioinit(void)
@@ -214,7 +187,6 @@ void keyin_ioinit(void)
     LATC = 0x00;
     TRISC = TRIS_C_VAL_O;
 //    lcd_backlightinit();
-    io_intcountinit();
 }
 #endif