2012-08-13 02:12:42 +00:00
|
|
|
To use this driver template
|
|
|
|
1. Copy this entire directory (including the directory itself)
|
|
|
|
into halext/drivers
|
|
|
|
2. Rename the directory to match your hardware.
|
|
|
|
3. Customise each file in the directory including the .mk file
|
|
|
|
and this file. An example for this file is below...
|
|
|
|
4. Keep any board specific code in a file you create called
|
|
|
|
gdisp_lld_board_yourboardname.h and adjust gdisp.c to match.
|
|
|
|
This enables someone porting to a new board to add another
|
|
|
|
suitable boad definition without worrying about the rest of
|
|
|
|
the driver. See the gdispNokia6610 driver as an example.
|
|
|
|
|
|
|
|
------------------------------------------------------------------
|
|
|
|
To use this driver:
|
|
|
|
|
|
|
|
1. Add in your halconf.h:
|
2012-10-20 23:47:11 +00:00
|
|
|
a) #define GFX_USE_GDISP TRUE
|
2012-08-13 02:12:42 +00:00
|
|
|
b) Any optional high level driver defines (see gdisp.h) eg: GDISP_NEED_MULTITHREAD
|
|
|
|
c) One (only) of:
|
2012-09-29 18:56:30 +00:00
|
|
|
#define GDISP_USE_GPIO
|
|
|
|
#define GDISP_USE_SPI
|
|
|
|
#define GDISP_USE_FSMC
|
2012-08-13 02:12:42 +00:00
|
|
|
d) All of the following (with appropriate values):
|
2012-10-10 23:41:18 +00:00
|
|
|
#define GDISP_SCREEN_WIDTH 128
|
|
|
|
#define GDISP_SCREEN_HEIGHT 128
|
2012-08-13 02:12:42 +00:00
|
|
|
e) If you are not using a known board then create a gdisp_lld_board.h file
|
|
|
|
and ensure it is on your include path.
|
|
|
|
Use the gdisp_lld_board_example.h file as a basis.
|
|
|
|
Currently known boards are:
|
|
|
|
XXXXXXXXX
|
|
|
|
|
|
|
|
|
|
|
|
2. To your makefile add the following lines:
|
|
|
|
include $(CHIBIOS)/os/halext/halext.mk
|
|
|
|
include $(CHIBIOS)/os/halext/drivers/gdispXXXXX/gdisp_lld.mk
|