[PATCH] add hd44780-spi driver
[email protected] Tue, 1 Oct 2013 09:26:19 +0100
| Newsgroups | gmane.comp.sysutils.lcdproc |
|---|---|
| Message-ID | <[email protected]> |
From: Simon Dawson <[email protected]> Add support for hd44780 compatible driver connected via SPI The patch has been tested using a EA DIP204-6 module, which contains a Samsung KS0073 driver. Should also work with the newer EA DIP203-6 module, which contains an SSD1803 driver. Not sure if there is too much KS0073-specific code in this for it to be acceptable as a general-purpose hd44780-spi driver... Signed-off-by: Simon Dawson <[email protected]> --- diff -Nurp a/acinclude.m4 b/acinclude.m4 --- a/acinclude.m4 2012-09-01 22:34:24.000000000 +0100 +++ b/acinclude.m4 2013-10-01 08:52:33.256754428 +0100 @@ -228,6 +228,9 @@ dnl else if test "$x_ac_have_i2c" = yes; then HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-i2c.o" fi + if test "$x_ac_have_spi" = yes; then + HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-spi.o" + fi DRIVERS="$DRIVERS hd44780${SO}" actdrivers=["$actdrivers hd44780"] ;; diff -Nurp a/configure b/configure --- a/configure 2012-11-04 10:52:44.000000000 +0000 +++ b/configure 2013-10-01 08:52:33.264754314 +0100 @@ -5545,6 +5545,25 @@ $as_echo "#define HAVE_I2C 1" >>confdefs fi +x_ac_have_spi=no +for ac_header in linux/spi/spidev.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/spi/spidev.h" "ac_cv_header_linux_spi_spidev_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_spi_spidev_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_SPI_SPIDEV_H 1 +_ACEOF + x_ac_have_spi=yes +fi + +done + +if test "$x_ac_have_spi" = yes; then + +$as_echo "#define HAVE_SPI 1" >>confdefs.h + +fi + ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` @@ -8518,6 +8537,9 @@ $as_echo "#define WITH_ETHLCD 1" >>confd if test "$x_ac_have_i2c" = yes; then HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-i2c.o" fi + if test "$x_ac_have_spi" = yes; then + HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-spi.o" + fi DRIVERS="$DRIVERS hd44780${SO}" actdrivers="$actdrivers hd44780" ;; diff -Nurp a/configure.in b/configure.in --- a/configure.in 2012-11-04 10:41:16.000000000 +0000 +++ b/configure.in 2013-10-01 08:52:33.264754314 +0100 @@ -167,6 +167,12 @@ if test "$x_ac_have_i2c" = yes; then AC_DEFINE(HAVE_I2C,[1],[Define to 1 if you have the i2c headers]) fi +x_ac_have_spi=no +AC_CHECK_HEADERS([linux/spi/spidev.h], [x_ac_have_spi=yes]) +if test "$x_ac_have_spi" = yes; then + AC_DEFINE(HAVE_SPI,[1],[Define to 1 if you have the spi headers]) +fi + dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC diff -Nurp a/docs/LCDd.8.in b/docs/LCDd.8.in --- a/docs/LCDd.8.in 2012-08-19 15:29:07.000000000 +0100 +++ b/docs/LCDd.8.in 2013-10-01 08:52:33.264754314 +0100 @@ -182,6 +182,9 @@ USS-720 USB-to-IEEE 1284 Bridge (Belkin .B i2c LCD in 4-bit mode driven by PCF8574(A) / PCA9554(A), connected via I2C bus .TP +.B spi +LCD in 4-bit mode, connected via SPI bus +.TP .B ftdi USB connection via a FTDI FT2232D chip in bitbang mode .TP diff -Nurp a/server/drivers/hd44780.c b/server/drivers/hd44780.c --- a/server/drivers/hd44780.c 2012-08-19 15:29:08.000000000 +0100 +++ b/server/drivers/hd44780.c 2013-10-01 08:52:33.264754314 +0100 @@ -427,6 +427,13 @@ HD44780_init(Driver *drvthis) (p->have_output?" out":"") ); break; + case IF_TYPE_SPI: + sprintf(buf, "SPI %s%s%s", + (p->have_backlight?" bl":""), + (p->have_keypad?" key":""), + (p->have_output?" out":"") + ); + break; case IF_TYPE_TCP: sprintf(buf, "TCP %s%s%s", (p->have_backlight?" bl":""), diff -Nurp a/server/drivers/hd44780-drivers.h b/server/drivers/hd44780-drivers.h --- a/server/drivers/hd44780-drivers.h 2012-08-19 15:29:08.000000000 +0100 +++ b/server/drivers/hd44780-drivers.h 2013-10-01 08:52:33.264754314 +0100 @@ -32,6 +32,9 @@ #ifdef HAVE_I2C # include "hd44780-i2c.h" #endif +#ifdef HAVE_SPI +# include "hd44780-spi.h" +#endif #ifdef WITH_ETHLCD # include "hd44780-ethlcd.h" #endif @@ -78,6 +81,9 @@ static const ConnectionMapping connectio #ifdef HAVE_I2C { "i2c", HD44780_CT_I2C, IF_TYPE_I2C, hd_init_i2c }, #endif +#ifdef HAVE_SPI + { "spi", HD44780_CT_SPI, IF_TYPE_SPI, hd_init_spi }, +#endif /* TCP socket connection types */ #ifdef WITH_ETHLCD { "ethlcd", HD44780_CT_ETHLCD, IF_TYPE_TCP, hd_init_ethlcd }, diff -Nurp a/server/drivers/hd44780-low.h b/server/drivers/hd44780-low.h --- a/server/drivers/hd44780-low.h 2012-08-19 15:29:08.000000000 +0100 +++ b/server/drivers/hd44780-low.h 2013-10-01 08:53:48.783726432 +0100 @@ -53,6 +53,7 @@ #define HD44780_CT_USBLCD 19 #define HD44780_CT_USBTINY 20 #define HD44780_CT_USB4ALL 21 +#define HD44780_CT_SPI 22 /**@}*/ /** \name Symbolic names for interface types @@ -63,6 +64,7 @@ #define IF_TYPE_USB 3 #define IF_TYPE_I2C 4 #define IF_TYPE_TCP 5 +#define IF_TYPE_SPI 6 /**@}*/ /** \name Symbolic default values @@ -150,6 +152,10 @@ typedef struct hd44780_private_data { int ftdi_line_backlight; #endif +#ifdef HAVE_SPI + int backlight_fd; /* file handle to backlight device */ +#endif + #ifdef WITH_ETHLCD int sock; /**< socket for TCP devices */ #endif diff -Nurp a/server/drivers/hd44780-spi.c b/server/drivers/hd44780-spi.c --- a/server/drivers/hd44780-spi.c 1970-01-01 01:00:00.000000000 +0100 +++ b/server/drivers/hd44780-spi.c 2013-10-01 09:13:47.450917014 +0100 @@ -0,0 +1,234 @@ +/** \file server/drivers/hd44780-spi.c + * \c SPI connection type of \c hd44780 driver for Hitachi HD44780 based LCD displays. + * + * The LCD is operated in its serial mode to be connected via the SPI bus + * using the Linux kernel spidev interface. + * The LCD SPI device should be declared in your board setup code + */ + +/* Copyright (c) 2013 Simon Dawson <[email protected]> + * 2005 Matthias Goebl <[email protected]> + * 2000, 1999, 1995 Benjamin Tse <[email protected]> + * 2001 Joris Robijn <[email protected]> + * 1999 Andrew McMeikan <[email protected]> + * 1998 Richard Rognlie <[email protected]> + * 1997 Matthias Prinke <[email protected]> + * + * Configuration: + * Device=/dev/spidev0.0 # the device file of the spi bus (spi 0, chipselect 0) + * BacklightDevice=(undef) # the device file for the backlight (1 = on, 0 = off) + * Based mostly on the hd44780-i2c module, see there for a complete history. + * + * This file is released under the GNU General Public License. Refer to the + * COPYING file distributed with this package. + */ + +#include "hd44780-spi.h" +#include "hd44780-low.h" + +#include "report.h" +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <unistd.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <linux/spi/spidev.h> + +// Generally, any function that accesses the LCD control lines needs to be +// implemented separately for each HW design. This is typically (but not +// restricted to): +// HD44780_senddata +// HD44780_readkeypad + +void spi_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char flags, unsigned char ch); +void spi_HD44780_backlight(PrivateData *p, unsigned char state); + +/** KS0073 5-bit sync lead-in on SPI interface - don't have a real HD44780 to compare */ +#define SYNC 0xF8u +/** KS0073 Read Write bit: 1 = read selected data/register, 0 = write to selected data/register */ +#define RW 0x04u +/** KS0073 Register Select bit: 0 = instruction register follows, 1 = data register follows */ +#define RS 0x02u + + +/*! \brief Reverses the bits of \a u8. + * + * \param u8 __u8 of which to reverse the bits. + * + * \return Value resulting from \a u8 with reversed bits. + */ +static inline __u8 bit_reverse8(__u8 u8) +{ + /* + * See + * http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith32Bits + * Individually, the code snippets here are in the public domain + * + * for principles of operation see the comments at + * http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv + * + * Reverse the bits in a byte with 7 operations (no 64-bit): + * b = ((b * 0x0802LU & 0x22110LU) | (b * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16; + * + * Make sure you assign or cast the result to an unsigned char to remove + * garbage in the higher bits. Devised by Sean Anderson, July 13, 2001. + * Typo spotted and correction supplied by Mike Keith, January 3, 2002. + */ + return (__u8)((u8 * 0x0802LU & 0x22110LU) | (u8 * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16; +} + +static int spi_transfer(PrivateData *p, const unsigned char *outbuf, unsigned char *inbuf, unsigned length) +{ + struct spi_ioc_transfer xfer; + int status; + + static unsigned char no_more_errormsgs=0; + + memset(&xfer, 0, sizeof xfer); + xfer.tx_buf = (__u64)outbuf; + xfer.rx_buf = (__u64)inbuf; + xfer.len = length; + + p->hd44780_functions->drv_debug(RPT_DEBUG, "SPI sending %02x %02x %02x", + outbuf[0], outbuf[1], length > 2 ? outbuf[2] : 0xFFu ); + status = ioctl(p->fd, SPI_IOC_MESSAGE(1), &xfer); + if (status < 0) { + p->hd44780_functions->drv_report(no_more_errormsgs?RPT_DEBUG:RPT_ERR, "HD44780: SPI: spidev write data %u failed: %s", + status, strerror(errno)); + no_more_errormsgs=1; + } +#ifdef DEBUG + if (inbuf) + p->hd44780_functions->drv_debug(RPT_DEBUG, "SPI returned data %02x %02x %02x", + inbuf[0], inbuf[1], length > 2 ? inbuf[2] : 0xFFu ); +#endif + + return status; +} + + +#define DEFAULT_DEVICE "/dev/spidev0-0" + + +/** + * Initialize the driver. + * \param drvthis Pointer to driver structure. + * \retval 0 Success. + * \retval -1 Error. + */ +int +hd_init_spi(Driver *drvthis) +{ + PrivateData *p = (PrivateData*) drvthis->private_data; + HD44780_functions *hd44780_functions = p->hd44780_functions; + + char device[256] = DEFAULT_DEVICE; + char backlight_device[256] = ""; + int i; + + /* READ CONFIG FILE */ + + /* Get SPI device to use */ + strncpy(device, drvthis->config_get_string(drvthis->name, "Device", 0, DEFAULT_DEVICE), sizeof(device)); + device[sizeof(device)-1] = '\0'; + report(RPT_INFO,"HD44780: SPI: Using device '%s'", device); + + + /* Open the SPI device */ + p->fd = open(device, O_RDWR); + if (p->fd < 0) { + report(RPT_ERR, "HD44780: SPI: open spidev device '%s' failed: %s", device, strerror(errno)); + return(-1); + } + + p->backlight_fd = -1; + + strncpy(backlight_device, drvthis->config_get_string(drvthis->name, "BacklightDevice", 0, ""), sizeof(backlight_device)); + backlight_device[sizeof(backlight_device)-1] = '\0'; + report(RPT_INFO,"HD44780: SPI: Using backlight_device '%s'", backlight_device); + + /* Open the backlight device */ + if (strlen(backlight_device)) { + int rc; + unsigned char byte; + p->backlight_fd = open(backlight_device, O_RDWR); + if (p->backlight_fd < 0) { + report(RPT_ERR, "HD44780: SPI: open backlight_device '%s' failed: %s", device, strerror(errno)); + return(-1); + } + rc = read(p->backlight_fd, &byte, sizeof(byte)); + if (-1 == rc) { + report(RPT_ERR, "HD44780: SPI: Cannot read state of backlight device: %d (%s)", + errno, strerror(errno)); + } else { + report(RPT_DEBUG, "HD44780: SPI: backlight setting is currently '%c'", byte); + p->backlight_bit = ('0' == byte ? 0 : 1); + } + } + + hd44780_functions->senddata = spi_HD44780_senddata; + hd44780_functions->backlight = spi_HD44780_backlight; + + common_init(p, IF_8BIT); + + return 0; +} + + +/** + * Send data or commands to the display. + * \param p Pointer to driver's private data structure. + * \param displayID ID of the display (or 0 for all) to send data to. + * \param flags Defines whether to end a command or data. + * \param ch The value to send. + */ +void +spi_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char flags, unsigned char ch) +{ + unsigned char buf[3]; + unsigned char reverse; + + p->hd44780_functions->drv_report(RPT_DEBUG, "HD44780: SPI: sending %s %02x", RS_INSTR == flags ? "CMD" : "DATA", ch); + + if (RS_INSTR == flags) + buf[0] = SYNC; + else + buf[0] = SYNC | RS; + + /* KS0073 wants Least Significant Bit first, with the added twist of + * peculiar splitting of a byte across 4 nibbles. + * + * If we ever need to read from the device, remember to + * bit_reverse8() each byte (note that replies aren't split into nibbles). + */ + reverse = bit_reverse8(ch); + buf[1] = reverse & 0xF0; + buf[2] = (reverse & 0x0F) << 4; + + spi_transfer( p, buf, NULL, sizeof(buf) ); +} + + +/** + * Turn display backlight on or off. + * \param p Pointer to driver's private data structure. + * \param state New backlight status. + * + * KS0073 in SPI mode does not have a backlight control function. We + * assume instead that there is some device mapped to a file which we can + * write to. + */ +void spi_HD44780_backlight(PrivateData *p, unsigned char state) +{ + p->backlight_bit = (p->have_backlight&&state) ? 1 : 0; + + if (p->backlight_fd != -1) { + unsigned char byte = '0' + p->backlight_bit; + int rc; + rc = write(p->backlight_fd, &byte, sizeof(byte)); + if (-1 == rc) + p->hd44780_functions->drv_report(RPT_ERR, "HD44780: SPI: Cannot write to backlight device: %d (%s)", + errno, strerror(errno)); + } +} diff -Nurp a/server/drivers/hd44780-spi.h b/server/drivers/hd44780-spi.h --- a/server/drivers/hd44780-spi.h 1970-01-01 01:00:00.000000000 +0100 +++ b/server/drivers/hd44780-spi.h 2013-10-01 08:52:33.264754314 +0100 @@ -0,0 +1,9 @@ +#ifndef HD_SPI_H +#define HD_SPI_H + +#include "lcd.h" /* for Driver */ + +// initialise this particular driver +int hd_init_spi(Driver *drvthis); + +#endif diff -Nurp a/server/drivers/Makefile.am b/server/drivers/Makefile.am --- a/server/drivers/Makefile.am 2012-08-19 15:29:08.000000000 +0100 +++ b/server/drivers/Makefile.am 2013-10-01 08:52:33.268754257 +0100 @@ -95,7 +95,7 @@ EXTRA_glcd_SOURCES = glcd-t6963.c t6963_ glcdlib_SOURCES = lcd.h lcd_lib.h glcdlib.h glcdlib.c report.h glk_SOURCES = lcd.h glk.c glk.h glkproto.c glkproto.h report.h hd44780_SOURCES = lcd.h lcd_lib.h hd44780.h hd44780.c hd44780-drivers.h hd44780-low.h hd44780-charmap.h report.h adv_bignum.h -EXTRA_hd44780_SOURCES = hd44780-4bit.c hd44780-4bit.h hd44780-ext8bit.c hd44780-ext8bit.h lcd_sem.c lcd_sem.h hd44780-serialLpt.c hd44780-serialLpt.h hd44780-serial.c hd44780-serial.h hd44780-winamp.c hd44780-winamp.h hd44780-bwct-usb.c hd44780-bwct-usb.h hd44780-lcd2usb.c hd44780-lcd2usb.h hd44780-usbtiny.c hd44780-usbtiny.h hd44780-lis2.c hd44780-lis2.h hd44780-i2c.c hd44780-i2c.h hd44780-ftdi.c hd44780-ftdi.h hd44780-ethlcd.c hd44780-ethlcd.h hd44780-uss720.c hd44780-uss720.h hd44780-usblcd.c hd44780-usblcd.h hd44780-usb4all.c hd44780-usb4all.h port.h lpt-port.h timing.h +EXTRA_hd44780_SOURCES = hd44780-4bit.c hd44780-4bit.h hd44780-ext8bit.c hd44780-ext8bit.h lcd_sem.c lcd_sem.h hd44780-serialLpt.c hd44780-serialLpt.h hd44780-serial.c hd44780-serial.h hd44780-winamp.c hd44780-winamp.h hd44780-bwct-usb.c hd44780-bwct-usb.h hd44780-lcd2usb.c hd44780-lcd2usb.h hd44780-usbtiny.c hd44780-usbtiny.h hd44780-lis2.c hd44780-lis2.h hd44780-i2c.c hd44780-i2c.h hd44780-spi.c hd44780-spi.h hd44780-ftdi.c hd44780-ftdi.h hd44780-ethlcd.c hd44780-ethlcd.h hd44780-uss720.c hd44780-uss720.h hd44780-usblcd.c hd44780-usblcd.h hd44780-usb4all.c hd44780-usb4all.h port.h lpt-port.h timing.h i2500vfd_SOURCES = lcd.h i2500vfd.c i2500vfd.h glcd_font5x8.h report.h icp_a106_SOURCES = lcd.h lcd_lib.h icp_a106.c icp_a106.h report.h imon_SOURCES = lcd.h lcd_lib.h hd44780-charmap.h imon.h imon.c report.h adv_bignum.h diff -Nurp a/server/drivers/Makefile.in b/server/drivers/Makefile.in --- a/server/drivers/Makefile.in 2012-11-04 10:52:43.000000000 +0000 +++ b/server/drivers/Makefile.in 2013-10-01 08:52:33.268754257 +0100 @@ -532,7 +532,7 @@ EXTRA_glcd_SOURCES = glcd-t6963.c t6963_ glcdlib_SOURCES = lcd.h lcd_lib.h glcdlib.h glcdlib.c report.h glk_SOURCES = lcd.h glk.c glk.h glkproto.c glkproto.h report.h hd44780_SOURCES = lcd.h lcd_lib.h hd44780.h hd44780.c hd44780-drivers.h hd44780-low.h hd44780-charmap.h report.h adv_bignum.h -EXTRA_hd44780_SOURCES = hd44780-4bit.c hd44780-4bit.h hd44780-ext8bit.c hd44780-ext8bit.h lcd_sem.c lcd_sem.h hd44780-serialLpt.c hd44780-serialLpt.h hd44780-serial.c hd44780-serial.h hd44780-winamp.c hd44780-winamp.h hd44780-bwct-usb.c hd44780-bwct-usb.h hd44780-lcd2usb.c hd44780-lcd2usb.h hd44780-usbtiny.c hd44780-usbtiny.h hd44780-lis2.c hd44780-lis2.h hd44780-i2c.c hd44780-i2c.h hd44780-ftdi.c hd44780-ftdi.h hd44780-ethlcd.c hd44780-ethlcd.h hd44780-uss720.c hd44780-uss720.h hd44780-usblcd.c hd44780-usblcd.h hd44780-usb4all.c hd44780-usb4all.h port.h lpt-port.h timing.h +EXTRA_hd44780_SOURCES = hd44780-4bit.c hd44780-4bit.h hd44780-ext8bit.c hd44780-ext8bit.h lcd_sem.c lcd_sem.h hd44780-serialLpt.c hd44780-serialLpt.h hd44780-serial.c hd44780-serial.h hd44780-winamp.c hd44780-winamp.h hd44780-bwct-usb.c hd44780-bwct-usb.h hd44780-lcd2usb.c hd44780-lcd2usb.h hd44780-usbtiny.c hd44780-usbtiny.h hd44780-lis2.c hd44780-lis2.h hd44780-i2c.c hd44780-i2c.h hd44780-spi.c hd44780-spi.h hd44780-ftdi.c hd44780-ftdi.h hd44780-ethlcd.c hd44780-ethlcd.h hd44780-uss720.c hd44780-uss720.h hd44780-usblcd.c hd44780-usblcd.h hd44780-usb4all.c hd44780-usb4all.h port.h lpt-port.h timing.h i2500vfd_SOURCES = lcd.h i2500vfd.c i2500vfd.h glcd_font5x8.h report.h icp_a106_SOURCES = lcd.h lcd_lib.h icp_a106.c icp_a106.h report.h imon_SOURCES = lcd.h lcd_lib.h hd44780-charmap.h imon.h imon.c report.h adv_bignum.h @@ -850,6 +850,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hd44780-hd44780-ext8bit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hd44780-hd44780-ftdi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hd44780-hd44780-i2c.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hd44780-hd44780-spi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hd44780-hd44780-lcd2usb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hd44780-hd44780-lis2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hd44780-hd44780-serial.Po@am__quote@ @@ -1221,6 +1222,20 @@ hd44780-hd44780-i2c.obj: hd44780-i2c.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hd44780_CFLAGS) $(CFLAGS) -c -o hd44780-hd44780-i2c.obj `if test -f 'hd44780-i2c.c'; then $(CYGPATH_W) 'hd44780-i2c.c'; else $(CYGPATH_W) '$(srcdir)/hd44780-i2c.c'; fi` +hd44780-hd44780-spi.o: hd44780-spi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hd44780_CFLAGS) $(CFLAGS) -MT hd44780-hd44780-spi.o -MD -MP -MF $(DEPDIR)/hd44780-hd44780-spi.Tpo -c -o hd44780-hd44780-spi.o `test -f 'hd44780-spi.c' || echo '$(srcdir)/'`hd44780-spi.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hd44780-hd44780-spi.Tpo $(DEPDIR)/hd44780-hd44780-spi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hd44780-spi.c' object='hd44780-hd44780-spi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hd44780_CFLAGS) $(CFLAGS) -c -o hd44780-hd44780-spi.o `test -f 'hd44780-spi.c' || echo '$(srcdir)/'`hd44780-spi.c + +hd44780-hd44780-spi.obj: hd44780-spi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hd44780_CFLAGS) $(CFLAGS) -MT hd44780-hd44780-spi.obj -MD -MP -MF $(DEPDIR)/hd44780-hd44780-spi.Tpo -c -o hd44780-hd44780-spi.obj `if test -f 'hd44780-spi.c'; then $(CYGPATH_W) 'hd44780-spi.c'; else $(CYGPATH_W) '$(srcdir)/hd44780-spi.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hd44780-hd44780-spi.Tpo $(DEPDIR)/hd44780-hd44780-spi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hd44780-spi.c' object='hd44780-hd44780-spi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hd44780_CFLAGS) $(CFLAGS) -c -o hd44780-hd44780-spi.obj `if test -f 'hd44780-spi.c'; then $(CYGPATH_W) 'hd44780-spi.c'; else $(CYGPATH_W) '$(srcdir)/hd44780-spi.c'; fi` + hd44780-hd44780-ftdi.o: hd44780-ftdi.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hd44780_CFLAGS) $(CFLAGS) -MT hd44780-hd44780-ftdi.o -MD -MP -MF $(DEPDIR)/hd44780-hd44780-ftdi.Tpo -c -o hd44780-hd44780-ftdi.o `test -f 'hd44780-ftdi.c' || echo '$(srcdir)/'`hd44780-ftdi.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hd44780-hd44780-ftdi.Tpo $(DEPDIR)/hd44780-hd44780-ftdi.Po