commit
f326f5786f
10 changed files with 44 additions and 37 deletions
|
@ -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_lcdSetViewPort(x, lines > 0 ? (y+gap) : y, cx, abslines);
|
||||||
lld_lcdWriteStreamStart();
|
lld_lcdWriteStreamStart();
|
||||||
gap = cx*abslines;
|
gap = cx*abslines;
|
||||||
for(i = 0; i < gap; i++) lld_lcdWriteData(color);
|
for(i = 0; i < gap; i++) lld_lcdWriteData(bgcolor);
|
||||||
lld_lcdWriteStreamStop();
|
lld_lcdWriteStreamStop();
|
||||||
lld_lcdResetViewPort();
|
lld_lcdResetViewPort();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#define GDISP_HARDWARE_ELLIPSEFILLS FALSE
|
#define GDISP_HARDWARE_ELLIPSEFILLS FALSE
|
||||||
#define GDISP_HARDWARE_TEXT FALSE
|
#define GDISP_HARDWARE_TEXT FALSE
|
||||||
#define GDISP_HARDWARE_TEXTFILLS FALSE
|
#define GDISP_HARDWARE_TEXTFILLS FALSE
|
||||||
#define GDISP_HARDWARE_SCROLL FALSE
|
#define GDISP_HARDWARE_SCROLL TRUE
|
||||||
#define GDISP_HARDWARE_PIXELREAD FALSE
|
#define GDISP_HARDWARE_PIXELREAD FALSE
|
||||||
#define GDISP_HARDWARE_CONTROL TRUE
|
#define GDISP_HARDWARE_CONTROL TRUE
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# List of all the ChibiOS/RT META files, there is no need to remove the files
|
# 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.
|
# 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_fonts.c \
|
||||||
${CHIBIOS}/os/halext/src/gdisp_emulation.c
|
${CHIBIOS}/os/halext/src/gdisp_emulation.c
|
||||||
|
|
||||||
# Required include directories
|
# Required include directories
|
||||||
HALINC += ${CHIBIOS}/os/halext/include
|
HALINC += ${CHIBIOS}/os/halext/include
|
||||||
|
|
|
@ -218,6 +218,7 @@ extern "C" {
|
||||||
#if GDISP_NEED_TEXT
|
#if GDISP_NEED_TEXT
|
||||||
void gdispDrawChar(coord_t x, coord_t y, char c, font_t font, color_t color);
|
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 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
|
#endif
|
||||||
|
|
||||||
/* Read a pixel Function */
|
/* Read a pixel Function */
|
||||||
|
@ -232,7 +233,7 @@ extern "C" {
|
||||||
|
|
||||||
/* Set driver specific control */
|
/* Set driver specific control */
|
||||||
#if GDISP_NEED_CONTROL
|
#if GDISP_NEED_CONTROL
|
||||||
void gdispControl(unsigned what, void *value);
|
void gdispControl(int what, void *value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -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 _getCharWidth(f,c) (((c) < (f)->minChar || (c) > (f)->maxChar) ? 0 : (f)->widthTable[(c) - (f)->minChar])
|
||||||
#define _getCharOffset(f,c) ((f)->offsetTable[(c) - (f)->minChar])
|
#define _getCharOffset(f,c) ((f)->offsetTable[(c) - (f)->minChar])
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
To include any of these functions/drivers in your project...
|
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...
|
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
|
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.
|
4/ In your project halconf.h turn on the support you want eg.
|
||||||
/**
|
/**
|
||||||
* @brief Enables the GDISP subsystem.
|
* @brief Enables the GDISP subsystem.
|
||||||
*/
|
*/
|
||||||
#if !defined(HAL_USE_GDISP) || defined(__DOXYGEN__)
|
#if !defined(HAL_USE_GDISP) || defined(__DOXYGEN__)
|
||||||
#define HAL_USE_GDISP TRUE
|
#define HAL_USE_GDISP TRUE
|
||||||
/* Any driver specific defines required go here */
|
|
||||||
#define GDISP_NEED_MULTITHREAD TRUE
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
5/ Do a make clean.
|
5/ Do a make clean.
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
The new GDISP driver is an architecture independant rewrite of the GLCD interface.
|
The new GDISP driver is an architecture independent rewrite of the GLCD interface.
|
||||||
This new architecture independance should allow many new low level drivers to be easily added.
|
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
|
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.
|
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.
|
use the GDISP driver with little or no change.
|
||||||
|
|
||||||
It is written in the ChibiOS style with ChibiOS style includes and documentation.
|
It is written in the ChibiOS style with ChibiOS style includes and documentation.
|
||||||
|
|
40
lcd.mk
40
lcd.mk
|
@ -3,21 +3,29 @@ ifeq ($(LCDLIB),)
|
||||||
LCDLIB = $(CHIBIOS)/ext/lcd
|
LCDLIB = $(CHIBIOS)/ext/lcd
|
||||||
endif
|
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) \
|
include $(LCDLIB)/halext/halext.mk
|
||||||
$(LCD_GLCD_SRC) \
|
|
||||||
$(LCD_TOUCHPAD_SRC) \
|
|
||||||
$(LCD_GRAPH_SRC) \
|
|
||||||
$(LCD_GUI_SRC)
|
# 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
7
readme
|
@ -6,12 +6,7 @@ http://chibios.org/dokuwiki/doku.php?id=chibios:community
|
||||||
|
|
||||||
|
|
||||||
## Maintainer & Contributors
|
## Maintainer & Contributors
|
||||||
Contributors:
|
please read the contributors.txt file which contains a full history of each contribution
|
||||||
- Badger -> console implementation and FSMC
|
|
||||||
- Abhishek -> font rendering
|
|
||||||
- Ben William -> fastMath and lcdDrawEllipse()
|
|
||||||
- dxli (Dongxu Li) -> lcdDrawEllipse() filled option
|
|
||||||
- inmarket -> ChibiOS'ify and retructure
|
|
||||||
|
|
||||||
Maintainer:
|
Maintainer:
|
||||||
- Joel Bodenmann aka Tectu <joel@unormal.org>
|
- Joel Bodenmann aka Tectu <joel@unormal.org>
|
||||||
|
|
|
@ -27,7 +27,7 @@ volatile static struct cal cal = {
|
||||||
|
|
||||||
static const SPIConfig spicfg = {
|
static const SPIConfig spicfg = {
|
||||||
NULL,
|
NULL,
|
||||||
GPIOC,
|
TP_CS_PORT,
|
||||||
TP_CS,
|
TP_CS,
|
||||||
SPI_CR1_SPE | SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0,
|
SPI_CR1_SPE | SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue