From 813bdf445255b0e5b129f755dede4aa5b2b41439 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Mon, 30 May 2016 14:10:25 +0200 Subject: [PATCH] Display: add regression test for 4-bit bus and HD44780 display. (Ab)use the old Gen7 v1.3 configuration for this, as this is rarely in use and because this board also happens to be the board where the tested code was developed on. --- Makefile-common | 3 +++ config/board.gen7-v1.1-v1.3.h | 18 +++++++++--------- testcases/config.regtest-display.h | 6 ++++++ 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 testcases/config.regtest-display.h diff --git a/Makefile-common b/Makefile-common index 19efb5e..11f4d8b 100644 --- a/Makefile-common +++ b/Makefile-common @@ -136,6 +136,9 @@ regressiontests: # The configuration used for performance measurements. $(MAKE) -f Makefile-AVR USER_CONFIG=testcases/config.h.Profiling \ MCU=atmega644 F_CPU=20000000UL EXTRA_CFLAGS=-Werror all + # Test for parallel 4-bit bus and HD44780 display using an old Gen7. + $(MAKE) -f Makefile-AVR USER_CONFIG=testcases/config.regtest-display.h \ + EXTRA_CFLAGS=-Werror all # Continue with ARM based boards, a Gen7-ARM. $(MAKE) -f Makefile-ARM USER_CONFIG=testcases/config.regtest-gen7-arm.h \ EXTRA_CFLAGS=-Werror all diff --git a/config/board.gen7-v1.1-v1.3.h b/config/board.gen7-v1.1-v1.3.h index dc29e2f..4d68a8d 100644 --- a/config/board.gen7-v1.1-v1.3.h +++ b/config/board.gen7-v1.1-v1.3.h @@ -293,7 +293,7 @@ DEFINE_HEATER(bed, DIO3, 0, 1) Comment in the one in use, comment out all others. If there is no display, comment out all of them to remove display code for better performance. */ -//#define DISPLAY_BUS_4BIT +#define DISPLAY_BUS_4BIT //#define DISPLAY_BUS_8BIT //#define DISPLAY_BUS_I2C //#define DISPLAY_BUS_SPI @@ -304,13 +304,13 @@ DEFINE_HEATER(bed, DIO3, 0, 1) Pins necessary for the 4-bit parallel display bus. Taken into account with DISPLAY_BUS_4BIT defined, only. */ -//#define DISPLAY_RS_PIN xxxx -//#define DISPLAY_RW_PIN xxxx -//#define DISPLAY_E_PIN xxxx -//#define DISPLAY_D4_PIN xxxx -//#define DISPLAY_D5_PIN xxxx -//#define DISPLAY_D6_PIN xxxx -//#define DISPLAY_D7_PIN xxxx +#define DISPLAY_RS_PIN PC1 +#define DISPLAY_RW_PIN PC0 +#define DISPLAY_E_PIN PD2 +#define DISPLAY_D4_PIN PD3 +#define DISPLAY_D5_PIN PD4 +#define DISPLAY_D6_PIN PD5 +#define DISPLAY_D7_PIN PD6 /** \def DISPLAY_TYPE_SSD1306 DISPLAY_TYPE_HD44780 @@ -321,4 +321,4 @@ DEFINE_HEATER(bed, DIO3, 0, 1) display, comment out all of DISPLAY_BUS_xxx. */ //#define DISPLAY_TYPE_SSD1306 -//#define DISPLAY_TYPE_HD44780 +#define DISPLAY_TYPE_HD44780 diff --git a/testcases/config.regtest-display.h b/testcases/config.regtest-display.h new file mode 100644 index 0000000..15c5e1a --- /dev/null +++ b/testcases/config.regtest-display.h @@ -0,0 +1,6 @@ + +// Configuration for controller board. +#include "../config/board.gen7-v1.1-v1.3.h" + +// Configuration for printer board. +#include "../config/printer.wolfstrap.h"