OSDN Git Service

[LCD] Use LCD_I2CADDR in lcd_acm1602.h.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 31 Aug 2013 14:30:31 +0000 (23:30 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 31 Aug 2013 14:30:31 +0000 (23:30 +0900)
main.c
ui.h

diff --git a/main.c b/main.c
index 047bb1d..e3218ab 100644 (file)
--- a/main.c
+++ b/main.c
@@ -289,7 +289,7 @@ int main(void)
     intadc_init();
     set_powerlamp(1);
     valinit();
-    acm1602_init(0xa0, 1); //Init LCD
+    acm1602_init(LCD_I2CADDR, 1); //Init LCD
     lcd_setbacklight(0xff, 255);
     /* Check EEPROM */
     check_eeprom();
diff --git a/ui.h b/ui.h
index dc06abf..c4bf264 100644 (file)
--- a/ui.h
+++ b/ui.h
@@ -48,14 +48,14 @@ extern char keyin_fifo[32];
 extern char keyin_nowp;
 extern char keyin_counter;
 
-#define _LOCATE(x,y) acm1602_locate_16x2(0xa0, x, y)
-#define _PUTCHAR(c) acm1602_putchar(0xa0, c)
-#define _CURSOR_LEFT() acm1602_cursordir(0xa0, 0x00)
-#define _CURSOR_RIGHT() acm1602_cursordir(0xa0, 0xff)
-#define _CLS() acm1602_cls(0xa0);
-#define _HOME() acm1602_home(0xa0);
-#define _CURSOR_ON() acm1602_dispcursor(0xa0, 0xff)
-#define _CURSOR_OFF() acm1602_dispcursor(0xa0, 0x00)
+#define _LOCATE(x,y) acm1602_locate_16x2(LCD_I2CADDR, x, y)
+#define _PUTCHAR(c) acm1602_putchar(LCD_I2CADDR, c)
+#define _CURSOR_LEFT() acm1602_cursordir(LCD_I2CADDR, 0x00)
+#define _CURSOR_RIGHT() acm1602_cursordir(LCD_I2CADDR, 0xff)
+#define _CLS() acm1602_cls(LCD_I2CADDR);
+#define _HOME() acm1602_home(LCD_I2CADDR);
+#define _CURSOR_ON() acm1602_dispcursor(LCD_I2CADDR, 0xff)
+#define _CURSOR_OFF() acm1602_dispcursor(LCD_I2CADDR, 0x00)