diff options
author | Andrew Hannam <andrewh@inmarket.com.au> | 2012-08-08 10:37:45 -0700 |
---|---|---|
committer | Andrew Hannam <andrewh@inmarket.com.au> | 2012-08-08 10:37:45 -0700 |
commit | f326f5786f7be89667196476bb926f03764c82d1 (patch) | |
tree | cea56b0491bf9ad87f96c77d51796d2a4dc51236 | |
parent | 9f33efcf21c6dc63187d7d77ff94e438a2733777 (diff) | |
parent | d2e660cc1350c16e0276a53ec36574f6be0390cc (diff) | |
download | uGFX-f326f5786f7be89667196476bb926f03764c82d1.tar.gz uGFX-f326f5786f7be89667196476bb926f03764c82d1.tar.bz2 uGFX-f326f5786f7be89667196476bb926f03764c82d1.zip |
Merge pull request #1 from Tectu/master
Merge Tectu Changes
-rw-r--r-- | halext/drivers/gdispS6d1121/gdisp_lld.c | 2 | ||||
-rw-r--r-- | halext/drivers/gdispS6d1121/gdisp_lld_config.h | 2 | ||||
-rw-r--r-- | halext/halext.mk | 5 | ||||
-rw-r--r-- | halext/include/gdisp.h | 3 | ||||
-rw-r--r-- | halext/include/gdisp_fonts.h | 2 | ||||
-rw-r--r-- | halext/readme.txt | 12 | ||||
-rw-r--r-- | halext/src/gdisp-readme.txt | 6 | ||||
-rw-r--r-- | lcd.mk | 44 | ||||
-rw-r--r-- | readme | 7 | ||||
-rw-r--r-- | touchpad/touchpad.c | 2 |
10 files changed, 46 insertions, 39 deletions
diff --git a/halext/drivers/gdispS6d1121/gdisp_lld.c b/halext/drivers/gdispS6d1121/gdisp_lld.c index dfac4e82..4e83fc82 100644 --- a/halext/drivers/gdispS6d1121/gdisp_lld.c +++ b/halext/drivers/gdispS6d1121/gdisp_lld.c @@ -568,7 +568,7 @@ void gdisp_lld_drawpixel(coord_t x, coord_t y, color_t color) { lld_lcdSetViewPort(x, lines > 0 ? (y+gap) : y, cx, abslines);
lld_lcdWriteStreamStart();
gap = cx*abslines;
- for(i = 0; i < gap; i++) lld_lcdWriteData(color);
+ for(i = 0; i < gap; i++) lld_lcdWriteData(bgcolor);
lld_lcdWriteStreamStop();
lld_lcdResetViewPort();
}
diff --git a/halext/drivers/gdispS6d1121/gdisp_lld_config.h b/halext/drivers/gdispS6d1121/gdisp_lld_config.h index 83f5ce3d..9e01b901 100644 --- a/halext/drivers/gdispS6d1121/gdisp_lld_config.h +++ b/halext/drivers/gdispS6d1121/gdisp_lld_config.h @@ -45,7 +45,7 @@ #define GDISP_HARDWARE_ELLIPSEFILLS FALSE
#define GDISP_HARDWARE_TEXT FALSE
#define GDISP_HARDWARE_TEXTFILLS FALSE
-#define GDISP_HARDWARE_SCROLL FALSE
+#define GDISP_HARDWARE_SCROLL TRUE
#define GDISP_HARDWARE_PIXELREAD FALSE
#define GDISP_HARDWARE_CONTROL TRUE
diff --git a/halext/halext.mk b/halext/halext.mk index b0e1b8df..8768a07b 100644 --- a/halext/halext.mk +++ b/halext/halext.mk @@ -1,8 +1,9 @@ # List of all the ChibiOS/RT META files, there is no need to remove the files
# from this list, you can disable parts of the kernel by editing halconf.h.
-HALSRC += ${CHIBIOS}/os/halext/src/gdisp.c \
+
+HALSRC += ${CHIBIOS}/os/halext/src/gdisp.c \
${CHIBIOS}/os/halext/src/gdisp_fonts.c \
${CHIBIOS}/os/halext/src/gdisp_emulation.c
# Required include directories
-HALINC += ${CHIBIOS}/os/halext/include
+HALINC += ${CHIBIOS}/os/halext/include
diff --git a/halext/include/gdisp.h b/halext/include/gdisp.h index 454f5c4c..ddb12137 100644 --- a/halext/include/gdisp.h +++ b/halext/include/gdisp.h @@ -218,6 +218,7 @@ extern "C" { #if GDISP_NEED_TEXT
void gdispDrawChar(coord_t x, coord_t y, char c, font_t font, color_t color);
void gdispFillChar(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor);
+ void gdispDrawString(coord_t x, coord_t y, const char *str, font_t font, color_t color);
#endif
/* Read a pixel Function */
@@ -232,7 +233,7 @@ extern "C" { /* Set driver specific control */
#if GDISP_NEED_CONTROL
- void gdispControl(unsigned what, void *value);
+ void gdispControl(int what, void *value);
#endif
#else
diff --git a/halext/include/gdisp_fonts.h b/halext/include/gdisp_fonts.h index a271030e..a1a4c3cb 100644 --- a/halext/include/gdisp_fonts.h +++ b/halext/include/gdisp_fonts.h @@ -80,7 +80,7 @@ struct font { };
/**
- * @brief Macro's to get to the complex parts of the font structure.
+ * @brief Macros to get to the complex parts of the font structure.
*/
#define _getCharWidth(f,c) (((c) < (f)->minChar || (c) > (f)->maxChar) ? 0 : (f)->widthTable[(c) - (f)->minChar])
#define _getCharOffset(f,c) ((f)->offsetTable[(c) - (f)->minChar])
diff --git a/halext/readme.txt b/halext/readme.txt index 98987d39..5983635a 100644 --- a/halext/readme.txt +++ b/halext/readme.txt @@ -1,18 +1,20 @@ To include any of these functions/drivers in your project...
- 1/ Place this halext directory into the $(CHIBIOS)/os directory
+ 1/ Specify the path to the LCDLIB. If none defined, default is $(CHIBIOS)/ext/lcd
+
2/ In your project Makefile (amongst similiar lines but after the hal line) add the line...
- include $(CHIBIOS)/os/halext/halext.mk
+ include $(LCDLIB)/lcd.mk
+
3/ In your project Makefile add the makefiles for any specific drivers you want e.g
- include $(CHIBIOS)/os/halext/drivers/gdispNokia6610/gdisp_lld.mk
+ include $(LCDLIB)/halext/drivers/gdispNokia6610/gdisp_lld.mk
+
4/ In your project halconf.h turn on the support you want eg.
/**
* @brief Enables the GDISP subsystem.
*/
#if !defined(HAL_USE_GDISP) || defined(__DOXYGEN__)
#define HAL_USE_GDISP TRUE
- /* Any driver specific defines required go here */
- #define GDISP_NEED_MULTITHREAD TRUE
#endif
+
5/ Do a make clean.
diff --git a/halext/src/gdisp-readme.txt b/halext/src/gdisp-readme.txt index 12b00e2c..28b86077 100644 --- a/halext/src/gdisp-readme.txt +++ b/halext/src/gdisp-readme.txt @@ -1,10 +1,10 @@ -The new GDISP driver is an architecture independant rewrite of the GLCD interface.
-This new architecture independance should allow many new low level drivers to be easily added.
+The new GDISP driver is an architecture independent rewrite of the GLCD interface.
+This new architecture independence should allow many new low level drivers to be easily added.
GDISP allows low-level driver hardware accelerated drawing routines while providing a software emulation
if the low level driver can not provide it. A basic low level driver now only requires 2 routines to be written.
-A glcd.h compatability file has been included that allow applications written to use the existing GLCD driver to
+A glcd.h compatibility file has been included that allow applications written to use the existing GLCD driver to
use the GDISP driver with little or no change.
It is written in the ChibiOS style with ChibiOS style includes and documentation.
@@ -3,21 +3,29 @@ ifeq ($(LCDLIB),) LCDLIB = $(CHIBIOS)/ext/lcd endif -include $(LCDLIB)/drivers/drivers.mk -include $(LCDLIB)/glcd/glcd.mk -include $(LCDLIB)/touchpad/touchpad.mk -include $(LCDLIB)/graph/graph.mk -include $(LCDLIB)/gui/gui.mk - -LCDSRC = $(LCD_DRIVERS_SRC) \ - $(LCD_GLCD_SRC) \ - $(LCD_TOUCHPAD_SRC) \ - $(LCD_GRAPH_SRC) \ - $(LCD_GUI_SRC) - -LCDINC = $(LCDLIB) \ - $(LCD_DRIVERS_INC) \ - $(LCD_GLCD_INC) \ - $(LCD_TOUCHPAD_INC) \ - $(LCD_GRAPH_INC) \ - $(LCD_GUI_INC) + +include $(LCDLIB)/halext/halext.mk + + + +# this is used for the old structure - will get removed soon + +#include $(LCDLIB)/drivers/drivers.mk +#include $(LCDLIB)/glcd/glcd.mk +#include $(LCDLIB)/touchpad/touchpad.mk +#include $(LCDLIB)/graph/graph.mk +#include $(LCDLIB)/gui/gui.mk + +#LCDSRC = $(LCD_DRIVERS_SRC) \ +# $(LCD_GLCD_SRC) \ +# $(LCD_TOUCHPAD_SRC) \ +# $(LCD_GRAPH_SRC) \ +# $(LCD_GUI_SRC) + +#LCDINC = $(LCDLIB) \ +# $(LCD_DRIVERS_INC) \ +# $(LCD_GLCD_INC) \ +# $(LCD_TOUCHPAD_INC) \ +# $(LCD_GRAPH_INC) \ +# $(LCD_GUI_INC) + @@ -6,12 +6,7 @@ http://chibios.org/dokuwiki/doku.php?id=chibios:community ## Maintainer & Contributors
-Contributors:
- - Badger -> console implementation and FSMC
- - Abhishek -> font rendering
- - Ben William -> fastMath and lcdDrawEllipse()
- - dxli (Dongxu Li) -> lcdDrawEllipse() filled option
- - inmarket -> ChibiOS'ify and retructure
+please read the contributors.txt file which contains a full history of each contribution
Maintainer:
- Joel Bodenmann aka Tectu <joel@unormal.org>
diff --git a/touchpad/touchpad.c b/touchpad/touchpad.c index 2caa55e7..1ef54190 100644 --- a/touchpad/touchpad.c +++ b/touchpad/touchpad.c @@ -27,7 +27,7 @@ volatile static struct cal cal = { static const SPIConfig spicfg = { NULL, - GPIOC, + TP_CS_PORT, TP_CS, SPI_CR1_SPE | SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0, }; |