26#ifndef _ULTIBO_HD44780_H
27#define _ULTIBO_HD44780_H
37#define HD44780_CONSOLE_DESCRIPTION "Hitachi HD44780 LCD Controller"
40#define HD44780_CLEARDISPLAY 0x01
41#define HD44780_RETURNHOME 0x02
42#define HD44780_ENTRYMODESET 0x04
43#define HD44780_DISPLAYCONTROL 0x08
44#define HD44780_CURSORSHIFT 0x10
45#define HD44780_FUNCTIONSET 0x20
46#define HD44780_SETCGRAMADDR 0x40
47#define HD44780_SETDDRAMADDR 0x80
50#define HD44780_ENTRYMODESET_RIGHT 0x00
51#define HD44780_ENTRYMODESET_LEFT 0x02
52#define HD44780_ENTRYMODESET_SHIFTINC 0x01
53#define HD44780_ENTRYMODESET_SHIFTDEC 0x00
56#define HD44780_DISPLAYCONTROL_DISPLAYON 0x04
57#define HD44780_DISPLAYCONTROL_DISPLAYOFF 0x00
58#define HD44780_DISPLAYCONTROL_CURSORON 0x02
59#define HD44780_DISPLAYCONTROL_CURSOROFF 0x00
60#define HD44780_DISPLAYCONTROL_BLINKON 0x01
61#define HD44780_DISPLAYCONTROL_BLINKOFF 0x00
64#define HD44780_CURSORSHIFT_DISPLAY 0x08
65#define HD44780_CURSORSHIFT_CURSOR 0x00
66#define HD44780_CURSORSHIFT_RIGHT 0x04
67#define HD44780_CURSORSHIFT_LEFT 0x00
70#define HD44780_FUNCTIONSET_8BITMODE 0x10
71#define HD44780_FUNCTIONSET_4BITMODE 0x00
72#define HD44780_FUNCTIONSET_2LINE 0x08
73#define HD44780_FUNCTIONSET_1LINE 0x00
74#define HD44780_FUNCTIONSET_5X10DOTS 0x04
75#define HD44780_FUNCTIONSET_5X8DOTS 0x00
78static const uint8_t HD44780_ROW_OFFSETS[4] = {0x00, 0x40, 0x14, 0x54};
107CONSOLE_DEVICE *
STDCALL hd44780_console_create(
GPIO_DEVICE *gpio,
char *name, uint32_t width, uint32_t height, uint32_t rs, uint32_t rw, uint32_t en, uint32_t d4, uint32_t d5, uint32_t d6, uint32_t d7);
struct _CONSOLE_DEVICE CONSOLE_DEVICE
Definition console.h:186
#define STDCALL
Definition globaltypes.h:45
struct _GPIO_DEVICE GPIO_DEVICE
Forward declared for GPIOPin.
Definition gpio.h:85
struct _HD44780_CONSOLE HD44780_CONSOLE
Definition hd44780.h:81
uint32_t STDCALL hd44780_console_destroy(CONSOLE_DEVICE *console)
CONSOLE_DEVICE *STDCALL hd44780_console_create(GPIO_DEVICE *gpio, char *name, uint32_t width, uint32_t height, uint32_t rs, uint32_t rw, uint32_t en, uint32_t d4, uint32_t d5, uint32_t d6, uint32_t d7)
uint32_t d4
The GPIO pin for the D4 line.
Definition hd44780.h:91
GPIO_DEVICE * gpio
The GPIO device this Console is connected to.
Definition hd44780.h:87
uint8_t cursorx
Definition hd44780.h:99
uint32_t d5
The GPIO pin for the D5 line.
Definition hd44780.h:92
uint32_t d7
The GPIO pin for the D7 line.
Definition hd44780.h:94
uint8_t cursory
Definition hd44780.h:100
uint32_t d6
The GPIO pin for the D6 line.
Definition hd44780.h:93
uint8_t displaycontrol
Current value of the Display Control settings.
Definition hd44780.h:97
uint8_t * buffer
Definition hd44780.h:103
uint32_t rw
The GPIO pin for the RW line.
Definition hd44780.h:89
uint32_t en
The GPIO pin for the EN line.
Definition hd44780.h:90
uint32_t rs
The GPIO pin for the RS line.
Definition hd44780.h:88
uint32_t size
Definition hd44780.h:102
CONSOLE_DEVICE console
Definition hd44780.h:85
uint8_t entrymode
Current value of the Entry Mode settings.
Definition hd44780.h:95
uint8_t functionset
Current value of the Function Set settings.
Definition hd44780.h:96