ESOS32
ESOSOn32-bitProcessors
Files | Data Structures | Macros | Functions | Variables
ESOS_Task_LCD_Service_WO

Files

file  esos_lcd44780wo.c
 
file  esos_lcd44780wo.h
 
file  esos_hwxxx_lcd44780wo.h
 This file contains routines which define, configure, and allow use of the "LCD character display" service on the target hardware (hwxxxx) in write-only mode.
 
file  esos_stm32l4_edub_4bit_lcd44780wo.h
 This file contains routines which define, configure, and allow use of the write-only "LCD character display" service on the STMicroelectronics ARM-Cortex hardware targeting the Edubase-v2 Communication with LCD display is via 6 GPIO pins (for RS,E, D4-D7) to implement the LCD nibble-wide data interface per the HD44780 informal specification.
 

Data Structures

struct  esos_lcd44780_char_t
 

Macros

#define ESOS_LCD44780_CMD_CLEAR_DISPLAY   0b00000001
 
#define ESOS_LCD44780_CMD_RETURN_HOME   0b00000010
 
#define ESOS_LCD44780_CMD_ENTRY_MODE_SET   0b00000100
 
#define ESOS_LCD44780_CMD_ENTRY_MODE_SET_INC   0b00000010
 
#define ESOS_LCD44780_CMD_ENTRY_MODE_SET_SHIFT   0b00000001
 
#define ESOS_LCD44780_CMD_DISPLAY_ON_OFF   0b00001000
 
#define ESOS_LCD44780_CMD_DISPLAY_ON_OFF_DISPLAYON   0b00000100
 
#define ESOS_LCD44780_CMD_DISPLAY_ON_OFF_CURSORON   0b00000010
 
#define ESOS_LCD44780_CMD_DISPLAY_ON_OFF_BLINKCURSOR   0b00000001
 
#define ESOS_LCD44780_CMD_CUR_DISP_CURSOR_SHIFT_L   0b00010000
 
#define ESOS_LCD44780_CMD_CUR_DISP_CURSOR_SHIFT_R   0b00010100
 
#define ESOS_LCD44780_CMD_CUR_DISP_DISPLAY_SHIFT_L   0b00011000
 
#define ESOS_LCD44780_CMD_CUR_DISP_DISPLAY_SHIFT_R   0b00011100
 
#define ESOS_LCD44780_CMD_FUNCTION_SET   0b00100000
 
#define ESOS_LCD44780_CMD_FUNCTION_SET_8BIT_MODE   0b00010000
 
#define ESOS_LCD44780_CMD_FUNCTION_SET_4BIT_MODE   0b00000000
 
#define ESOS_LCD44780_CMD_FUNCTION_SET_1LINE_MODE   0b00000000
 
#define ESOS_LCD44780_CMD_FUNCTION_SET_2LINE_MODE   0b00001000
 
#define ESOS_LCD44780_CMD_FUNCTION_SET_LOWFONT_MODE   0b00000000
 
#define ESOS_LCD44780_CMD_FUNCTION_SET_HIFONT_MODE   0b00000100
 
#define ESOS_LCD44780_CMD_SET_CGRAM_ADDR   0b01000000
 
#define ESOS_LCD44780_CMD_SET_DDRAM_ADDR   0b10000000
 
#define ESOS_LCD44780_MEM_WIDTH   40
 
#define ESOS_LCD44780_MEM_HEIGHT   2
 
#define ESOS_LCD44780_NUM_CUSTOM_CHARS   8
 
#define LCD44780_READ   1
 
#define LCD44780_WRITE   0
 
#define LCD44780_DATA   TRUE
 
#define LCD44780_COMMANDS   FALSE
 
#define ESOS_TASK_WAIT_ON_LCD44780_REFRESH()   ESOS_TASK_WAIT_UNTIL(esos_lcd44780_isCurrent())
 
#define ESOS_TASK_WAIT_LCD44780_WRITE_COMMAND(u8_cmd)
 
#define ESOS_TASK_WAIT_LCD44780_WRITE_COMMAND_NOWAIT(u8_cmd)
 
#define ESOS_TASK_WAIT_LCD44780_SET_CG_ADDRESS(u8_addr)   ESOS_TASK_WAIT_LCD44780_WRITE_COMMAND( u8_addr | ESOS_LCD44780_CMD_SET_CGRAM_ADDR )
 
#define ESOS_TASK_WAIT_LCD44780_SET_DATA_ADDRESS(u8_addr)   ESOS_TASK_WAIT_LCD44780_WRITE_COMMAND( u8_addr | ESOS_LCD44780_CMD_SET_DDRAM_ADDR )
 
#define ESOS_TASK_WAIT_LCD44780_WRITE_DATA(u8_data)
 
#define LCD_RS_PIN   GPIO12
 
#define LCD_RS_PORT   GPIOA
 
#define LCD_E_PIN   GPIO10
 
#define LCD_E_PORT   GPIOA
 
#define LCD_D4_PIN   GPIO1
 
#define LCD_D4_PORT   GPIOB
 
#define LCD_D5_PIN   GPIO2
 
#define LCD_D5_PORT   GPIOB
 
#define LCD_D6_PIN   GPIO3
 
#define LCD_D6_PORT   GPIOB
 
#define LCD_D7_PIN   GPIO4
 
#define LCD_D7_PORT   GPIOB
 

Functions

 ESOS_USER_TASK (__esos_lcd44780_service)
 
void esos_lcd44780_configDisplay (void)
 
void __esos_lcd44780_init (void)
 
void esos_lcd44780_clearScreen (void)
 
void esos_lcd44780_setCursorHome (void)
 
void esos_lcd44780_setCursor (uint8_t u8_row, uint8_t u8_column)
 
void esos_lcd44780_writeChar (uint8_t u8_row, uint8_t u8_column, uint8_t u8_data)
 
uint8_t esos_lcd44780_getChar (uint8_t u8_row, uint8_t u8_column)
 
void esos_lcd44780_writeBuffer (uint8_t u8_row, uint8_t u8_column, uint8_t *pu8_data, uint8_t u8_bufflen)
 
void esos_lcd44780_getBuffer (uint8_t u8_row, uint8_t u8_column, uint8_t *pu8_data, uint8_t u8_bufflen)
 
void esos_lcd44780_writeString (uint8_t u8_row, uint8_t u8_column, char *psz_data)
 
void esos_lcd44780_setCursorDisplay (BOOL u8_state)
 
BOOL esos_lcd44780_getCursorDisplay (void)
 
void esos_lcd44780_setCursorBlink (BOOL u8_state)
 
BOOL esos_lcd44780_getCursorBlink (void)
 
void esos_lcd44780_setDisplayVisible (BOOL u8_state)
 
BOOL esos_lcd44780_getDisplayVisible (void)
 
void esos_lcd44780_setCustomChar (uint8_t u8_charSlot, uint8_t *pu8_charData)
 
void esos_lcd44780_getCustomChar (uint8_t u8_charSlot, uint8_t *pu8_charData)
 
BOOL esos_lcd44780_isCurrent (void)
 
void __esos_lcd44780_hw_config (void)
 
 ESOS_CHILD_TASK (__esos_lcd44780_hw_write_u8, uint8_t u8_data, BOOL b_isData)
 

Variables

volatile struct stTask __stLCDChildTask
 
BOOL   ::b_cursorPositionNeedsUpdate
 
uint8_t   ::u8_cursorRow
 
uint8_t   ::u8_cursorCol
 
BOOL   ::b_cursorShownNeedsUpdate
 
BOOL   ::b_cursorShown
 
BOOL   ::b_cursorBlinkNeedsUpdate
 
BOOL   ::b_cursorBlink
 
BOOL   ::b_displayVisibleNeedsUpdate
 
BOOL   ::b_displayVisible
 
BOOL   ::ab_lcdBufferNeedsUpdate [ESOS_LCD44780_MEM_HEIGHT][ESOS_LCD44780_MEM_WIDTH]
 
char   ::aac_lcdBuffer [ESOS_LCD44780_MEM_HEIGHT][ESOS_LCD44780_MEM_WIDTH]
 
BOOL   ::ab_customCharNeedsUpdate [ESOS_LCD44780_NUM_CUSTOM_CHARS]
 
esos_lcd44780_char_t   ::ast_customChar [ESOS_LCD44780_NUM_CUSTOM_CHARS]
 
struct {
   BOOL   b_cursorPositionNeedsUpdate
 
   uint8_t   u8_cursorRow
 
   uint8_t   u8_cursorCol
 
   BOOL   b_cursorShownNeedsUpdate
 
   BOOL   b_cursorShown
 
   BOOL   b_cursorBlinkNeedsUpdate
 
   BOOL   b_cursorBlink
 
   BOOL   b_displayVisibleNeedsUpdate
 
   BOOL   b_displayVisible
 
   BOOL   ab_lcdBufferNeedsUpdate [ESOS_LCD44780_MEM_HEIGHT][ESOS_LCD44780_MEM_WIDTH]
 
   char   aac_lcdBuffer [ESOS_LCD44780_MEM_HEIGHT][ESOS_LCD44780_MEM_WIDTH]
 
   BOOL   ab_customCharNeedsUpdate [ESOS_LCD44780_NUM_CUSTOM_CHARS]
 
   esos_lcd44780_char_t   ast_customChar [ESOS_LCD44780_NUM_CUSTOM_CHARS]
 
esos_lcd44780_vars
 
uint8_t esos_lcd44780_char_t::au8_data [8]
 
volatile struct stTask __stLCDChildTask
 

Detailed Description

Macro Definition Documentation

◆ ESOS_TASK_WAIT_LCD44780_WRITE_COMMAND

#define ESOS_TASK_WAIT_LCD44780_WRITE_COMMAND (   u8_cmd)
Value:
do { \
ESOS_TASK_SPAWN_AND_WAIT( (ESOS_TASK_HANDLE) &__stLCDChildTask, __esos_lcd44780_hw_write_u8, u8_cmd, LCD44780_COMMANDS ); \
} while(0)

Definition at line 87 of file esos_lcd44780wo.h.

◆ ESOS_TASK_WAIT_LCD44780_WRITE_COMMAND_NOWAIT

#define ESOS_TASK_WAIT_LCD44780_WRITE_COMMAND_NOWAIT (   u8_cmd)
Value:
do { \
ESOS_TASK_SPAWN_AND_WAIT( (ESOS_TASK_HANDLE) &__stLCDChildTask, __esos_lcd44780_hw_write_u8, u8_cmd, LCD44780_COMMANDS ); \
} while(0)

Definition at line 91 of file esos_lcd44780wo.h.

◆ ESOS_TASK_WAIT_LCD44780_WRITE_DATA

#define ESOS_TASK_WAIT_LCD44780_WRITE_DATA (   u8_data)
Value:
do { \
ESOS_TASK_SPAWN_AND_WAIT( (ESOS_TASK_HANDLE) &__stLCDChildTask, __esos_lcd44780_hw_write_u8, u8_data, LCD44780_DATA ); \
} while(0)

Definition at line 101 of file esos_lcd44780wo.h.

Function Documentation

◆ ESOS_CHILD_TASK()

ESOS_CHILD_TASK ( __esos_lcd44780_hw_write_u8  ,
uint8_t  u8_data,
BOOL  b_isData 
)

ESOS child task to write data and commands to 44780-class LCD character modules

Parameters
u8_datadata/command byte to write to display
b_isDatais TRUE if the u8_data is "data" (RS is set), FALSE if u8_data is "command" (RS is cleared)
Note
This child task assumes that the associated hardware data pins are already configured, and the pins are in the "idle" state

Definition at line 59 of file esos_hwxxx_lcd44780wo.c.

ESOS_TASK_HANDLE