From c52fa746e085dd08eaea6033d1661378a5999c59 Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Fri, 2 Oct 2015 03:27:57 -0400 Subject: [PATCH] Removed repeated #defines for data lines Removed the repeated #defines for LCD_DBUS*[,_PORT,_DDR,_PIN] used for both FOUR_BIT_MODE and EIGHT_BIT_ARBITRARY_PIN_MODE. Signed-off-by: Collin J. Doering --- lcdLib.h | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/lcdLib.h b/lcdLib.h index 772c791..5cd87a3 100644 --- a/lcdLib.h +++ b/lcdLib.h @@ -46,7 +46,7 @@ //#define EIGHT_BIT_ARBITRARY_PIN_MODE // LCD in 4-bit mode (default is 8 bit mode) -//#define FOUR_BIT_MODE +#define FOUR_BIT_MODE // Mode sanity check #if defined (EIGHT_BIT_ARBITRARY_PIN_MODE) && defined (FOUR_BIT_MODE) @@ -112,31 +112,11 @@ #define LCD_DBUS3_PORT PORTB #define LCD_DBUS3_DDR DDRB #define LCD_DBUS3_PIN PINB - -#define LCD_DBUS4 PB4 -#define LCD_DBUS4_PORT PORTB -#define LCD_DBUS4_DDR DDRB -#define LCD_DBUS4_PIN PINB - -#define LCD_DBUS5 PB5 -#define LCD_DBUS5_PORT PORTB -#define LCD_DBUS5_DDR DDRB -#define LCD_DBUS5_PIN PINB - -#define LCD_DBUS6 PB6 -#define LCD_DBUS6_PORT PORTB -#define LCD_DBUS6_DDR DDRB -#define LCD_DBUS6_PIN PINB - -#define LCD_DBUS7 PB7 -#define LCD_DBUS7_PORT PORTB -#define LCD_DBUS7_DDR DDRB -#define LCD_DBUS7_PIN PINB #endif -/* FOUR_BIT_MODE specific settings */ +/* FOUR_BIT_MODE and EIGHT_BIT_ARBITRARY_PIN_MODE shared settings */ -#ifdef FOUR_BIT_MODE +#if defined (FOUR_BIT_MODE) || defined (EIGHT_BIT_ARBITRARY_PIN_MODE) #define LCD_DBUS4 PB4 #define LCD_DBUS4_PORT PORTB #define LCD_DBUS4_DDR DDRB