]> git.webhop.me Git - lcd4linux.git/commitdiff
Prevent HD44780 and HD44780_I2C from building at the same time
authoredman007 <edman007@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 18 Nov 2009 23:21:32 +0000 (23:21 +0000)
committeredman007 <edman007@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 18 Nov 2009 23:21:32 +0000 (23:21 +0000)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1063 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

drivers.m4
drv_HD44780.c

index b2e3d9f895623a76a5cb98ffabf799ebeccd3f76..0d52bc0586086da0815e04eda50b88e5d7bb5499 100644 (file)
@@ -33,7 +33,7 @@ AC_ARG_WITH(
   [                        (try 'all,\!<driver>' if your shell complains...)]
   [                        possible drivers are:]
   [                        BeckmannEgle, BWCT, CrystalFontz, Curses, Cwlinux, D4D,]
-  [                        EA232Graphic, G15, GLCD2USB, HD44780, HD44780-i2c, IRLCD,]
+  [                        EA232Graphic, G15, GLCD2USB, HD44780, HD44780-I2C, IRLCD,]
   [                        LCD2USB, LCDLinux, LEDMatrix, LCDTerm, LPH7508, LUIse,]
   [                        LW_ABP, M50530, MatrixOrbital, MatrixOrbitalGX,]
   [                        MilfordInstruments, Noritake, NULL, Pertelian, PHAnderson,]
@@ -359,20 +359,6 @@ if test "$GLCD2USB" = "yes"; then
    fi
 fi
 
-if test "$HD44780" = "yes"; then
-   if test "$has_parport" = "true"; then
-      TEXT="yes"
-      PARPORT="yes"
-      I2C="yes"
-      GPIO="yes"
-      KEYPAD="yes"
-      DRIVERS="$DRIVERS drv_HD44780.o"
-      AC_DEFINE(WITH_HD44780,1,[HD44780 driver])
-   else
-      AC_MSG_WARN(asm/io.h or {linux/parport.h and linux/ppdev.h} not found: HD44780 driver disabled)
-   fi
-fi
-
 if test "$HD44780_I2C" = "yes"; then
    TEXT="yes"
    I2C="yes"
@@ -381,6 +367,25 @@ if test "$HD44780_I2C" = "yes"; then
    AC_DEFINE(WITH_HD44780,1,[HD44780 driver])
 fi
 
+if test "$HD44780" = "yes"; then
+   if test "$HD44780_I2C" != "yes"; then
+      if test "$has_parport" = "true"; then
+         TEXT="yes"
+         PARPORT="yes"
+         I2C="yes"
+         GPIO="yes"
+         KEYPAD="yes"
+         DRIVERS="$DRIVERS drv_HD44780.o"
+         AC_DEFINE(WITH_HD44780,1,[HD44780 driver])
+      else
+         AC_MSG_WARN(asm/io.h or {linux/parport.h and linux/ppdev.h} not found: HD44780 driver disabled)
+      fi
+   else
+      HD44780="no"
+      AC_MSG_WARN(HD44780-i2c enabled disabling HD44780)
+   fi
+fi
+
 if test "$IRLCD" = "yes"; then
    if test "$has_usb" = "true"; then
       TEXT="yes"
index 9550f8da2184270276f78a92528e2297ca3effd3..bc3a97e88f953d0f586a868a9a9550fec877e8ea 100644 (file)
@@ -111,8 +111,8 @@ static unsigned char SIGNAL_ENABLE3;
 static unsigned char SIGNAL_ENABLE4;
 
 static unsigned char SIGNAL_GPO;
-static unsigned char SIGNAL_GPI;
 #ifdef WITH_PARPORT
+static unsigned char SIGNAL_GPI;
 static unsigned char SIGNAL_BACKLIGHT;
 static unsigned char SIGNAL_POWER;
 #endif
@@ -1410,10 +1410,11 @@ int drv_HD_init(const char *section, const int quiet)
     /* initialize generic GPIO driver */
     if ((ret = drv_generic_gpio_init(section, Name)) != 0)
        return ret;
-
+       
+#ifdef WITH_PARPORT
     if ((ret = drv_generic_keypad_init(section, Name)) != 0)
        return ret;
-
+#endif
     /* register text widget */
     wc = Widget_Text;
     wc.draw = drv_generic_text_draw;