Cleanup I2C handling

* Move OS specific code to new files i2c.h and i2c.c
* As side effect a likely bug (linux only code) in the existing driver
  has been fixed.

Compile tested on Debian/i386 and OpenWRT/arm.

Signed-off-by: Harald Geyer <harald@ccbib.org>
This commit is contained in:
Harald Geyer
2016-07-31 09:42:06 +02:00
parent ecd8aac043
commit 0a38c18f00
6 changed files with 161 additions and 71 deletions
+4
View File
@@ -231,6 +231,9 @@ dnl else
if test "$x_ac_have_i2c" = yes; then
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-i2c.o"
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-piplate.o"
HD44780_I2C="i2c.o"
else
HD44780_I2C=""
fi
if test "$x_ac_have_spi" = yes; then
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-spi.o hd44780-hd44780-pifacecad.o"
@@ -563,6 +566,7 @@ AC_SUBST(LIBLIRC_CLIENT)
AC_SUBST(LIBSVGA)
AC_SUBST(DRIVERS)
AC_SUBST(HD44780_DRIVERS)
AC_SUBST(HD44780_I2C)
AC_SUBST(GLCD_DRIVERS)
AC_SUBST(LIBG15)
AC_SUBST(LIBGLCD)