LCD HD44780 driver library v1.0.3
Macros | Typedefs | Functions | Variables
lcd_hd44780.c File Reference
#include "lcd_hd44780_GPIO_interface.h"
#include "lcd_hd44780.h"
#include "lcd_hd44780_driver_commands.h"
#include <stddef.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for lcd_hd44780.c:

Macros

#define BUSY_FLAG   1 << 7
 
#define VAL_PREFIX_LENGHT   2U
 
#define PRIVATE   static
 
#define LAST_CHAR_IN_LCD_LINE   (LCD_X - 1)
 
#define LAST_LCD_LINE   (LCD_Y - 1)
 

Typedefs

typedef char lcd_pos_t
 

Functions

char lcd_translate_char (char c)
 
void lcd_init (void)
 
void lcd_enable_backlight (void)
 Function for disabling backlight od the LCD.
 
void lcd_disable_backlight (void)
 Function that disable backlight of the LCD. This function change the backlight GPIO pin state to inactive. Active state of the GPIO backlight pin is defined by @ lcd_init()
 
void lcd_cls (void)
 Function that clears the LCD screen and sets the cursor on the position of the first character in the first line of the LCD screen.
 
void lcd_def_char (const uint8_t CGRAM_bank_x_char_adr, const uint8_t *def_char)
 Function for defining custom user characters in CGRAM of the LCD. More...
 
void lcd_load_char_bank (const lcd_bank_load_struct_t *char_bank_data)
 Function that loads to LCD_CGRAM predefined characters form specific user char_bank. More...
 
void lcd_char (const char C)
 Function for printing the char on the LCD screen under the current position of the LCD cursor. More...
 
void lcd_str (const char *str)
 Function for printing/writing the string on the LCD screen starting from the current LCD cursor position. More...
 
void lcd_int (int val, uint8_t width, enum LCD_alignment_e alignment)
 Function for printing the integer value on the LCD screen under the current position of the LCD cursor. More...
 
void lcd_hex (int val, uint8_t width, enum LCD_alignment_e alignment)
 Function for printing the integer value in hexadecimal format on the LCD screen under the current position of the LCD cursor. More...
 
void lcd_bin (int val, uint8_t width)
 Function for printing the integer value in hexadecimal format on the LCD screen under the current position of the LCD cursor. More...
 
void lcd_locate (enum LCD_LINES_e y, enum LCD_COLUMNS_e x)
 Function that moves LCD cursor to a specific position located under the x and y coordinate. More...
 
void lcd_home (void)
 Function that moves LCD cursor to the first position at the first row of the LCD screen.
 
void lcd_cursor_on (void)
 Function that activates the visibility of the LCD cursor.
 
void lcd_cursor_off (void)
 Function that deactivates the visibility and blinking of the LCD cursor.
 
void lcd_blinking_cursor_on (void)
 Function that activates the visibility and blinking of the LCD cursor.
 
void lcd_buf_cls (void)
 Function that puts spaces(0x32) in the whole LCD buffer and sets the cursor on the position of the first character in the first line of the LCD buffer.
 
void lcd_buf_char (const char c)
 Function for adding the char to the LCD buffer under the current position of the LCD buffer. More...
 
void lcd_buf_locate (enum LCD_LINES_e y, enum LCD_COLUMNS_e x)
 Function that changes the current LCD buffer position pointer to a specific position located under the x and y coordinate. More...
 
void lcd_buf_str (const char *str)
 Function for placing the string in the LCD buffer starts from the current LCD buffer position pointer. More...
 
void lcd_update (void)
 Function that prints on the LCD screen the content of The LCD buffer. The function sets also The LCD buffer position pointer to the First line's first character.
 
void lcd_buf_int (int val, uint8_t width, enum LCD_alignment_e alignment)
 Function for adding integer value as string to the LCD buffer under the current position of the LCD buffer pointer. More...
 
void lcd_buf_hex (int val, uint8_t width, enum LCD_alignment_e alignment)
 Function for adding integer value in hexadecimal format as a string to the LCD buffer under the current position of the LCD buffer pointer. More...
 
void lcd_buf_bin (int val, uint8_t width)
 Function for adding to the LCD buffer the integer value in binary format as a string under the current position of the LCD buffer pointer. More...
 

Variables

PRIVATE char lcd_buffer [LCD_Y][LCD_X]
 
PRIVATE char prev_lcd_buffer [LCD_Y][LCD_X]
 
PRIVATE bool LCD_BUFFER_UPDATE_FLAG = false
 

Detailed Description

Author
niwciu (niwci.nosp@m.u@gm.nosp@m.ail.c.nosp@m.om)
Version
1.0.2
Date
2024-02-25