30 #ifndef __UNI_LCD_LIB_HEADER__
31 #define __UNI_LCD_LIB_HEADER__
33 #if defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_UNO) || defined(ARDUINO_SAM_DUE)
39 #elif STM32_LIBOPENCM3
42 #include "stm32_delay.h"
43 #elif ESP8266_FREERTOS
46 #include "driver/gpio.h"
49 #error "Unsupported board or microcontroller."
55 #define LCD_CMD_CLEAR 0x01
59 #define LCD_CMD_HOME 0x02
64 #define LCD_CMD_ENTRY_MODE 0x04
68 #define LCD_CMD_ENTRY_INC_ADDRESS 0x02
72 #define LCD_CMD_ENTRY_SHIFT_LEFT 0x01
77 #define LCD_CMD_DISPLAY 0x08
81 #define LCD_CMD_DISPLAY_ON 0x04
85 #define LCD_CMD_DISPLAY_CUSROR 0x02
89 #define LCD_CMD_DISPLAY_CURSOR_BLINK 0x01
94 #define LCD_CMD_SHIFT 0x10
98 #define LCD_CMD_SHIFT_RIGHT 0x04
102 #define LCD_CMD_SHIFT_DISPLAY 0x08
108 #define LCD_CMD_FUNCTION 0x20
113 #define LCD_CMD_FUNC_8BIT_LENGTH 0x10
117 #define LCD_CMD_FUNC_LINES 0x04
121 #define LCD_CMD_FUNC_FONT 0x08
126 #define LCD_CMD_CG_RAM 0x40
130 #define LCD_CMD_DDRAM 0x80
137 #define INSTRUCTION_MODE_CMD 0x00
141 #define INSTRUCTION_MODE_CHAR 0x01
146 #define sendLCDData(d) sendLCDInstruction(d, INSTRUCTION_MODE_CHAR)
150 #define sendLCDCommand(c) sendLCDInstruction(c, INSTRUCTION_MODE_CMD)
168 #define clearLCD() sendLCDCommand(LCD_CMD_CLEAR)
172 #define returnToHome() sendLCDCommand(LCD_CMD_HOME)
177 #define printChar(c) sendLCDData(c)
181 #define printString(s) printStringLen(s, MAX_STR_LEN)
Arduino configuration file for YALI module.
#define CHAR
Definition: arduino-conf.h:61
#define VOID
Definition: arduino-conf.h:65
#define UCHAR
Definition: arduino-conf.h:57
ESP8266 RTOS SDK configuration file for YALI module.
STM32 - LibOpenCM3 configuration file for YALI module.
VOID initLCDInterface(VOID)
Initialize LCD interface.
Definition: unilcd.cpp:164
VOID setCustomChar(UCHAR addr, UCHAR *buffer)
Load custom character to the LCD RAM.
Definition: unilcd.cpp:474
VOID gotoLCDPosition(UCHAR x, UCHAR y)
Move the cursor to the given coordinates.
Definition: unilcd.cpp:356
VOID setDisplayState(UCHAR onState)
Control LCD screen.
Definition: unilcd.cpp:384
VOID setBacklightState(UCHAR backLightState)
Turn on or off the LCD backlight.
Definition: unilcd.cpp:497
VOID printStringLen(const CHAR *str, UCHAR maxLength)
Print string on LCD.
Definition: unilcd.cpp:331
VOID sendLCDInstruction(UCHAR data, UCHAR mode)
Send instructions or data to the HD44780 controller.
Definition: unilcd.cpp:238
VOID setCursorBlinkState(UCHAR blinkState)
Set cursor blinking mode.
Definition: unilcd.cpp:439
VOID setCursorState(UCHAR cursorState)
Set cursor display mode.
Definition: unilcd.cpp:412
VOID initLCD(VOID)
Initialize HD44780 controller.
Definition: unilcd.cpp:286
MPLAB XC C (PIC) configuration file for YALI module.