From 8cfc118052ae5c336ac010beae295087ae818d15 Mon Sep 17 00:00:00 2001 From: "Sebastian Schumb (softwerker" Date: Thu, 11 Jun 2009 16:13:10 +0200 Subject: [PATCH] replaced the PIND in lcd_read_byte. Usage of other ports then PORTD is now possible --- include/lc7981.c | 2 +- include/lc7981.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/lc7981.c b/include/lc7981.c index d48f07b..ef9192f 100644 --- a/include/lc7981.c +++ b/include/lc7981.c @@ -120,7 +120,7 @@ uint8_t i,data; lcd_rs_low(); lcd_rw_high(); _delay_us(1); - data = (uint8_t) PIND; + data = (uint8_t) LCD_DATA_PIN; lcd_en_low(); LCD_DATA_DDR = 0xFF; } diff --git a/include/lc7981.h b/include/lc7981.h index 78b1b2b..6beabc7 100644 --- a/include/lc7981.h +++ b/include/lc7981.h @@ -44,7 +44,8 @@ #define LCD_DATA PORTD //!< Port used for data -#define LCD_DATA_DDR DDRD //!< Data-Direction-Register for Data +#define LCD_DATA_PIN PIND //!< Port used for reading the data +#define LCD_DATA_DDR DDRD //!< Data-Direction-Register for data // Macros for (un)setting the control pins #define lcd_rs_high() (LCD_CTRL |= (1 << LCD_RS)) //!< Set the Register-Select pin high