From d4625a1e6a21640a4eed51bf4f6162e611aac5c4 Mon Sep 17 00:00:00 2001 From: Tectu Date: Sun, 17 Jun 2012 01:30:12 +0200 Subject: [PATCH] restructure --- drivers/drivers.mk | 7 +++++++ drivers/{ => lcd}/s6d1121_lld.c | 0 drivers/{ => lcd}/s6d1121_lld.h | 0 drivers/{ => lcd}/ssd1289_lld.c | 0 drivers/{ => lcd}/ssd1289_lld.h | 0 drivers/{ => touchpad}/ads7843_lld.c | 0 drivers/{ => touchpad}/ads7843_lld.h | 0 drivers/{ => touchpad}/xpt2046_lld.c | 0 drivers/{ => touchpad}/xpt2046_lld.h | 0 glcd.h | 4 ++-- lcd.mk | 24 ++++++++++++------------ touchpad.h | 4 ++-- 12 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 drivers/drivers.mk rename drivers/{ => lcd}/s6d1121_lld.c (100%) rename drivers/{ => lcd}/s6d1121_lld.h (100%) rename drivers/{ => lcd}/ssd1289_lld.c (100%) rename drivers/{ => lcd}/ssd1289_lld.h (100%) rename drivers/{ => touchpad}/ads7843_lld.c (100%) rename drivers/{ => touchpad}/ads7843_lld.h (100%) rename drivers/{ => touchpad}/xpt2046_lld.c (100%) rename drivers/{ => touchpad}/xpt2046_lld.h (100%) diff --git a/drivers/drivers.mk b/drivers/drivers.mk new file mode 100644 index 00000000..e5b3f34c --- /dev/null +++ b/drivers/drivers.mk @@ -0,0 +1,7 @@ +LCD_DRIVERS_SRC = $(LCDLIB)/drivers/lcd/ssd1289_lld.c \ + $(LCDLIB)/drivers/lcd/s6d1121_lld.c \ + $(LCDLIB)/drivers/touchpad/ads7843_lld.c \ + $(LCDLIB)/drivers/touchpad/xpt2046_lld.c \ + +LCD_DRIVERS_INC = $(LCDLIB)/drivers/lcd \ + $(LCDLIB)/drivers/touchpad \ diff --git a/drivers/s6d1121_lld.c b/drivers/lcd/s6d1121_lld.c similarity index 100% rename from drivers/s6d1121_lld.c rename to drivers/lcd/s6d1121_lld.c diff --git a/drivers/s6d1121_lld.h b/drivers/lcd/s6d1121_lld.h similarity index 100% rename from drivers/s6d1121_lld.h rename to drivers/lcd/s6d1121_lld.h diff --git a/drivers/ssd1289_lld.c b/drivers/lcd/ssd1289_lld.c similarity index 100% rename from drivers/ssd1289_lld.c rename to drivers/lcd/ssd1289_lld.c diff --git a/drivers/ssd1289_lld.h b/drivers/lcd/ssd1289_lld.h similarity index 100% rename from drivers/ssd1289_lld.h rename to drivers/lcd/ssd1289_lld.h diff --git a/drivers/ads7843_lld.c b/drivers/touchpad/ads7843_lld.c similarity index 100% rename from drivers/ads7843_lld.c rename to drivers/touchpad/ads7843_lld.c diff --git a/drivers/ads7843_lld.h b/drivers/touchpad/ads7843_lld.h similarity index 100% rename from drivers/ads7843_lld.h rename to drivers/touchpad/ads7843_lld.h diff --git a/drivers/xpt2046_lld.c b/drivers/touchpad/xpt2046_lld.c similarity index 100% rename from drivers/xpt2046_lld.c rename to drivers/touchpad/xpt2046_lld.c diff --git a/drivers/xpt2046_lld.h b/drivers/touchpad/xpt2046_lld.h similarity index 100% rename from drivers/xpt2046_lld.h rename to drivers/touchpad/xpt2046_lld.h diff --git a/glcd.h b/glcd.h index 75c47457..cb9d5b45 100644 --- a/glcd.h +++ b/glcd.h @@ -4,8 +4,8 @@ #include "ch.h" #include "hal.h" #include "fonts.h" -#include "drivers/ssd1289_lld.h" -#include "drivers/s6d1121_lld.h" +#include "drivers/lcd/ssd1289_lld.h" +#include "drivers/lcd/s6d1121_lld.h" #define SCREEN_WIDTH 240 #define SCREEN_HEIGHT 320 diff --git a/lcd.mk b/lcd.mk index 030c4398..1c54d5e9 100644 --- a/lcd.mk +++ b/lcd.mk @@ -1,13 +1,13 @@ -# LCD files. -LCDSRC = ${CHIBIOS}/ext/lcd/glcd.c \ - ${CHIBIOS}/ext/lcd/fonts.c \ - ${CHIBIOS}/ext/lcd/touchpad.c \ - ${CHIBIOS}/ext/lcd/graph.c \ - ${CHIBIOS}/ext/lcd/gui.c \ - ${CHIBIOS}/ext/lcd/drivers/ssd1289_lld.c \ - ${CHIBIOS}/ext/lcd/drivers/s6d1121_lld.c \ - ${CHIBIOS}/ext/lcd/drivers/ads7843_lld.c \ - ${CHIBIOS}/ext/lcd/drivers/xpt2046_lld.c \ +LCDLIB = $(CHIBIOS)/ext/lcd -LCDINC = ${CHIBIOS}/ext/lcd \ - ${CHIBIOS}/etc/lcd/drivers +include $(LCDLIB)/drivers/drivers.mk + +LCDSRC = $(LCDLIB)/glcd.c \ + $(LCDLIB)/fonts.c \ + $(LCDLIB)/touchpad.c \ + $(LCDLIB)/graph.c \ + $(LCDLIB)/gui.c \ + $(LCD_DRIVERS_SRC) + +LCDINC = $(LCDLIB) \ + $(LCD_DRIVERS_INC) diff --git a/touchpad.h b/touchpad.h index c0d736bc..dd2d7f14 100644 --- a/touchpad.h +++ b/touchpad.h @@ -4,8 +4,8 @@ #include "ch.h" #include "hal.h" #include "glcd.h" -#include "drivers/ads7843_lld.h" -#include "drivers/xpt2046_lld.h" +#include "drivers/touchpad/ads7843_lld.h" +#include "drivers/touchpad/xpt2046_lld.h" #define CONVERSIONS 3