Merge pull request #1 from Tectu/master

Merge Tectu Changes
ugfx_release_2.6
Andrew Hannam 2012-08-08 10:37:45 -07:00
commit f326f5786f
10 changed files with 44 additions and 37 deletions

View File

@ -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();
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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])

View File

@ -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.

View File

@ -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.

40
lcd.mk
View File

@ -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)
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)
LCDINC = $(LCDLIB) \
$(LCD_DRIVERS_INC) \
$(LCD_GLCD_INC) \
$(LCD_TOUCHPAD_INC) \
$(LCD_GRAPH_INC) \
$(LCD_GUI_INC)

7
readme
View File

@ -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>

View File

@ -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,
};