From de8278a3984945ca00c70daf88b7febd71312b57 Mon Sep 17 00:00:00 2001 From: mmdolze Date: Mon, 14 Sep 2009 18:27:00 +0000 Subject: [PATCH] Add a conditional whether to include the ethlcd connection type or not. --- acinclude.m4 | 1 + server/drivers/hd44780-drivers.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index f75c915..e90784a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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" diff --git a/server/drivers/hd44780-drivers.h b/server/drivers/hd44780-drivers.h index 75f60c6..288504e 100644 --- a/server/drivers/hd44780-drivers.h +++ b/server/drivers/hd44780-drivers.h @@ -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)