Add a conditional whether to include the ethlcd connection type or not.

This commit is contained in:
mmdolze
2009-09-14 18:27:00 +00:00
parent a3c186e3f4
commit de8278a398
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -200,6 +200,7 @@ dnl else
fi
if test "$enable_ethlcd" = yes ; then
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-ethlcd.o"
AC_DEFINE(WITH_ETHLCD,[1],[Define to 1 if you want to build hd44780 driver with ethlcd support])
fi
AC_CHECK_HEADER(linux/i2c-dev.h,
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-i2c.o"
+5 -1
View File
@@ -30,7 +30,9 @@
#ifdef HAVE_I2C
# include "hd44780-i2c.h"
#endif
#ifdef WITH_ETHLCD
# include "hd44780-ethlcd.h"
#endif
# include "hd44780-usblcd.h"
// add new connection type header files here
@@ -59,6 +61,7 @@ static const ConnectionMapping connectionMapping[] = {
/* USB connection types */
{ "lis2", HD44780_CT_LIS2, IF_TYPE_USB, hd_init_lis2 },
{ "mplay", HD44780_CT_MPLAY, IF_TYPE_USB, hd_init_lis2 },
{ "usblcd", HD44780_CT_USBLCD, IF_TYPE_USB, hd_init_usblcd },
#ifdef HAVE_LIBUSB
{ "bwctusb", HD44780_CT_BWCTUSB, IF_TYPE_USB, hd_init_bwct_usb },
{ "lcd2usb", HD44780_CT_LCD2USB, IF_TYPE_USB, hd_init_lcd2usb },
@@ -72,8 +75,9 @@ static const ConnectionMapping connectionMapping[] = {
{ "i2c", HD44780_CT_I2C, IF_TYPE_I2C, hd_init_i2c },
#endif
/* TCP socket connection types */
#ifdef WITH_ETHLCD
{ "ethlcd", HD44780_CT_ETHLCD, IF_TYPE_TCP, hd_init_ethlcd },
{ "usblcd", HD44780_CT_USBLCD, IF_TYPE_USB, hd_init_usblcd },
#endif
// add new connection types here
// ....
// default, end of structure element (do not delete)