TDISP to take ROWS and COLUMNS from board file

TDISP to take ROWS and COLUMNS from board file
ugfx_release_2.6
Andrew Hannam 2013-02-18 17:31:49 +10:00
parent 9329b22086
commit 2ed57aea77
2 changed files with 225 additions and 212 deletions

View File

@ -32,6 +32,17 @@
#if GFX_USE_TDISP /*|| defined(__DOXYGEN__)*/
/* Include the hardware interface details */
#if defined(TDISP_USE_CUSTOM_BOARD) && TDISP_USE_CUSTOM_BOARD
/* Include the user supplied board definitions */
#include "tdisp_lld_board.h"
#elif defined(BOARD_UNKNOWN)
#include "gdisp_lld_board_unknown.h"
#else
/* Include the user supplied board definitions */
#include "gdisp_lld_board.h"
#endif
/* The user may override the default display size */
#ifndef TDISP_COLUMNS
#define TDISP_COLUMNS 16
@ -52,17 +63,6 @@ tdispStruct TDISP = {
CUSTOM_CHAR_COUNT /* maxCustomChars */
};
/* Include the hardware interface details */
#if defined(TDISP_USE_CUSTOM_BOARD) && TDISP_USE_CUSTOM_BOARD
/* Include the user supplied board definitions */
#include "tdisp_lld_board.h"
#elif defined(BOARD_UNKNOWN)
#include "gdisp_lld_board_unknown.h"
#else
/* Include the user supplied board definitions */
#include "gdisp_lld_board.h"
#endif
/* Our display control */
#define DISPLAY_ON 0x04
#define CURSOR_ON 0x02

View File

@ -29,6 +29,19 @@
#ifndef _TDISP_LLD_BOARD_H
#define _TDISP_LLD_BOARD_H
/**
* The board may override the default display size.
* Uncomment the below if your board needs a non-standard size.
*/
/*
#ifndef TDISP_COLUMNS
#define TDISP_COLUMNS 16
#endif
#ifndef TDISP_ROWS
#define TDISP_ROWS 2
#endif
*/
static void init_board(void) {
/* Code here */
#error "tdispHD44780: You must supply a definition for init_board for your board"