2012-05-29 00:20:03 +00:00
|
|
|
Chibios LCD Driver
|
2012-05-23 11:29:39 +00:00
|
|
|
|
2012-05-29 00:20:03 +00:00
|
|
|
### checkout Driver code into ext/
|
2012-05-23 11:29:39 +00:00
|
|
|
cd chibios/ext
|
|
|
|
git clone https://github.com/tectu/Chibios-LCD-Driver lcd
|
|
|
|
|
2012-06-07 21:29:55 +00:00
|
|
|
### Edit boardfiles:
|
|
|
|
add the following to your board.h file, matching to your pinconfig:
|
2012-06-07 21:31:24 +00:00
|
|
|
#define TP_PORT GPIOC
|
|
|
|
#define TP_IRQ 4
|
|
|
|
#define TP_CS 6
|
|
|
|
|
|
|
|
#define LCD_DATA_PORT GPIOE
|
|
|
|
#define LCD_CMD_PORT GPIOD
|
|
|
|
#define LCD_CS 12
|
|
|
|
#define LCD_RS 13
|
|
|
|
#define LCD_WR 14
|
|
|
|
#define LCD_RD 15
|
2012-06-07 21:29:55 +00:00
|
|
|
|
2012-05-29 00:20:03 +00:00
|
|
|
### Edit Makefile:
|
2012-05-23 11:29:39 +00:00
|
|
|
include lcd.mk:
|
|
|
|
include $(CHIBIOS)/ext/lcd/lcd.mk
|
|
|
|
|
|
|
|
Add $(LCDSRC) to CSRC:
|
2012-05-23 11:32:11 +00:00
|
|
|
CSRC = $(PORTSRC) \
|
|
|
|
$(KERNSRC) \
|
|
|
|
$(TESTSRC) \
|
|
|
|
$(HALSRC) \
|
|
|
|
$(PLATFORMSRC) \
|
|
|
|
$(BOARDSRC) \
|
|
|
|
$(FATFSSRC) \
|
|
|
|
$(LCDSRC) \
|
|
|
|
$(CHIBIOS)/os/various/evtimer.c \
|
|
|
|
$(CHIBIOS)/os/various/syscalls.c
|
2012-05-23 11:29:39 +00:00
|
|
|
|
|
|
|
Add $(LCDINC) to INCDIR:
|
2012-05-23 11:32:11 +00:00
|
|
|
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
|
|
|
|
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
|
|
|
|
$(FATFSINC) \
|
|
|
|
$(LCDINC) \
|
|
|
|
$(CHIBIOS)/os/various ../common
|
2012-05-23 11:29:39 +00:00
|
|
|
|
2012-05-29 00:20:03 +00:00
|
|
|
### Use
|
2012-06-11 13:05:50 +00:00
|
|
|
1. include header files wherever you need it.
|
2012-05-23 11:29:39 +00:00
|
|
|
|
2012-06-11 13:05:50 +00:00
|
|
|
2. define the controller type you want to use anywhere in your project. For example:
|
2012-06-11 13:04:59 +00:00
|
|
|
|
2012-06-11 13:05:50 +00:00
|
|
|
#define LCD_USE_SSD1289
|
|
|
|
#define TOUCHPAD_USE_ADS7843
|
2012-06-11 13:04:59 +00:00
|
|
|
|