X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Flcd_hd44.h;h=0ebba9749db37940b094cc0c902842d9c7e50cb2;hb=2535cb94ec2183791128f8bbd109ca69a960cf78;hp=0413bed6af27ac9659d82ea4b4ce0cb1c69ec4c3;hpb=0c2f7108e2f9b6fa567bc83dda9a313fffceb286;p=bertos.git diff --git a/drv/lcd_hd44.h b/drv/lcd_hd44.h old mode 100755 new mode 100644 index 0413bed6..0ebba974 --- a/drv/lcd_hd44.h +++ b/drv/lcd_hd44.h @@ -1,8 +1,33 @@ -/*! +/** * \file * * * \brief Hitachi HD44780 and clones LCD module (interface) @@ -12,33 +37,13 @@ * \author Stefano Fedrigo */ -/*#* - *#* $Log$ - *#* Revision 1.1 2005/11/04 18:00:42 bernie - *#* Import into DevLib. - *#* - *#* Revision 1.2 2005/06/14 14:43:43 bernie - *#* Add DevLib headers. - *#* - *#* Revision 1.1 2005/05/24 09:17:58 batt - *#* Move drivers to top-level. - *#* - *#* Revision 1.3 2005/04/22 13:14:58 batt - *#* Better lcd rows and cols definition. - *#* - *#* Revision 1.2 2005/04/17 22:41:39 bernie - *#* lcd_test(): Rename to lcd_hw_test() and conditionalize on CONFIG_TEST. - *#* - *#* Revision 1.1 2005/04/16 19:48:35 aleph - *#* Rename lcd driver - *#*/ - #ifndef DRV_LCD_HD44_H #define DRV_LCD_HD44_H +#include #include /* For stdint types */ -/*! +/** * \name Display dimensions (in chars) * \{ */ @@ -46,19 +51,24 @@ #define LCD_COLS 16 /* \} */ -/*! +/** * \name Hitachi HD44 commands. * \{ */ #define LCD_CMD_DISPLAY_INI 0x30 -//#define LCD_CMD_SETFUNC 0x38 /*!< 8 bits, 2 lines, 5x7 dots */ -#define LCD_CMD_SETFUNC 0x28 /*!< 4 bits, 2 lines, 5x7 dots */ -#define LCD_CMD_DISPLAY_ON 0x0F /*!< Switch on display */ -#define LCD_CMD_DISPLAY_OFF 0x08 /*!< Switch off display */ -#define LCD_CMD_CLEAR 0x01 /*!< Clear display */ -#define LCD_CMD_CURSOR_BLOCK 0x0D /*!< Show cursor (block) */ -#define LCD_CMD_CURSOR_LINE 0x0F /*!< Show cursor (line) */ -#define LCD_CMD_CURSOR_OFF 0x0C /*!< Hide cursor */ + +#if CONFIG_LCD_4BIT + #define LCD_CMD_SETFUNC 0x28 /**< 4 bits, 2 lines, 5x7 dots */ +#else + #define LCD_CMD_SETFUNC 0x38 /**< 8 bits, 2 lines, 5x7 dots */ +#endif + +#define LCD_CMD_DISPLAY_ON 0x0F /**< Switch on display */ +#define LCD_CMD_DISPLAY_OFF 0x08 /**< Switch off display */ +#define LCD_CMD_CLEAR 0x01 /**< Clear display */ +#define LCD_CMD_CURSOR_BLOCK 0x0D /**< Show cursor (block) */ +#define LCD_CMD_CURSOR_LINE 0x0F /**< Show cursor (line) */ +#define LCD_CMD_CURSOR_OFF 0x0C /**< Hide cursor */ #define LCD_CMD_DISPLAYMODE 0x06 #define LCD_CMD_SET_CGRAMADDR 0x40 #define LCD_CMD_RESET_DDRAM 0x80 @@ -68,7 +78,7 @@ #define LCD_CMD_MOVESHIFT_RIGHT 0x04 /*\}*/ -/*! Type for combined LCD cursor position (x,y). */ +/** Type for combined LCD cursor position (x,y). */ typedef uint8_t lcdpos_t; void lcd_waitBusy(void);