Zap'Em Blast'Em Robots
robots that play laser tag!
Loading...
Searching...
No Matches
lcd.h
Go to the documentation of this file.
1
9
10#ifndef LCD_H
11#define LCD_H
12
13#include "stm32f4xx_hal.h"
14
16#define LCD_I2C_ADDR (0x27 << 1)
17
19extern I2C_HandleTypeDef hi2c1;
20
24void lcd_init(void);
25
29void lcd_clear(void);
30
37void lcd_set_cursor(uint8_t row, uint8_t col);
38
44void lcd_print(char *str);
45
51void lcd_send_command(uint8_t cmd);
52
58void lcd_send_data(uint8_t data);
59
63void lcd_force_backlight_on(void);
64
65#endif // LCD_H
void lcd_send_command(uint8_t cmd)
Sends a command byte to the LCD.
Definition lcd.c:57
void lcd_init(void)
Initializes the LCD in 4-bit I2C mode.
Definition lcd.c:82
void lcd_set_cursor(uint8_t row, uint8_t col)
Sets the LCD cursor to a specific row and column.
Definition lcd.c:114
void lcd_print(char *str)
Prints a null-terminated string to the LCD.
Definition lcd.c:125
void lcd_force_backlight_on(void)
Forces the LCD backlight to remain on.
Definition lcd.c:74
void lcd_send_data(uint8_t data)
Sends a data byte (character) to the LCD.
Definition lcd.c:67
void lcd_clear(void)
Clears the LCD display.
Definition lcd.c:103
I2C_HandleTypeDef hi2c1
External handle to use your I2C peripheral.
Definition main.c:57