Programmable Clock with RTOS 0.0.1
Implementaiton of a programmable clock using RTOS with STM32GO microcontroller.
Loading...
Searching...
No Matches
hel_lcd.h
Go to the documentation of this file.
1
8#ifndef HEL_LCD_H_
9#define HEL_LCD_H_
10
14#define LCD_OFF 0u
15#define LCD_ON 1u
16#define LCD_TOGGLE 2u
18
19
20#define ONE_MILISECOND 1u
21
22#define CLEAR_SCREEN 0
23#define ENTRY_MODE 1
24#define DISPLAY_ON 2
25#define INTERNAL_OSC_FREQUENCY 3
26#define WAKE_UP 4
27#define FUNCION_SET 5
28#define POWER_CONTROL 6
29#define FOLLOWER_CONTROL 7
30#define CONSTRAST 8
31
35typedef struct _LCD_HandleTypeDef
36{
37
38 SPI_HandleTypeDef *SpiHandler;
39 GPIO_TypeDef *RstPort;
40 uint32_t RstPin;
41 GPIO_TypeDef *RsPort;
42 uint32_t RsPin;
43 GPIO_TypeDef *CsPort;
44 uint32_t CsPin;
45 GPIO_TypeDef *BklPort;
46 uint32_t BklPin;
47
49
50/*Prototype of LCD's functions*/
51extern uint8_t HEL_LCD_Init( LCD_HandleTypeDef *hlcd );
52extern void HEL_LCD_MspInit( LCD_HandleTypeDef *hlcd );
53extern uint8_t HEL_LCD_Command( LCD_HandleTypeDef *hlcd, uint8_t cmd );
54extern uint8_t HEL_LCD_Data( LCD_HandleTypeDef *hlcd, uint8_t data );
55extern uint8_t HEL_LCD_String( LCD_HandleTypeDef *hlcd, char *str );
56extern uint8_t HEL_LCD_SetCursor( LCD_HandleTypeDef *hlcd, uint8_t row, uint8_t col );
57extern void HEL_LCD_Backlight( LCD_HandleTypeDef *hlcd, uint8_t state );
58extern uint8_t HEL_LCD_Contrast( LCD_HandleTypeDef *hlcd, uint8_t contrast );
59
60#endif
uint8_t HEL_LCD_Init(LCD_HandleTypeDef *hlcd)
Function to initialize the LCD.
Definition hel_lcd.c:20
void HEL_LCD_Backlight(LCD_HandleTypeDef *hlcd, uint8_t state)
Function to control the LCD backlight.
Definition hel_lcd.c:277
struct _LCD_HandleTypeDef LCD_HandleTypeDef
Struct for LCD HANDLER.
uint8_t HEL_LCD_String(LCD_HandleTypeDef *hlcd, char *str)
Function to send a string of characters to the LCD.
Definition hel_lcd.c:214
void HEL_LCD_MspInit(LCD_HandleTypeDef *hlcd)
Sub-initialization interface for the pins used by the LCD.
Definition hel_lcd.c:153
uint8_t HEL_LCD_Command(LCD_HandleTypeDef *hlcd, uint8_t cmd)
Function to send a command to the LCD.
Definition hel_lcd.c:169
uint8_t HEL_LCD_Contrast(LCD_HandleTypeDef *hlcd, uint8_t contrast)
Function to control the contrast level of the LCD.
Definition hel_lcd.c:307
uint8_t HEL_LCD_Data(LCD_HandleTypeDef *hlcd, uint8_t data)
Function to send a character to be displayed on the LCD using the SPI.
Definition hel_lcd.c:192
uint8_t HEL_LCD_SetCursor(LCD_HandleTypeDef *hlcd, uint8_t row, uint8_t col)
Function to locate the LCD cursor.
Definition hel_lcd.c:254
Struct for LCD HANDLER.
Definition hel_lcd.h:36
uint32_t CsPin
Definition hel_lcd.h:44
GPIO_TypeDef * RsPort
Definition hel_lcd.h:41
GPIO_TypeDef * CsPort
Definition hel_lcd.h:43
uint32_t BklPin
Definition hel_lcd.h:46
SPI_HandleTypeDef * SpiHandler
Definition hel_lcd.h:38
uint32_t RstPin
Definition hel_lcd.h:40
uint32_t RsPin
Definition hel_lcd.h:42
GPIO_TypeDef * RstPort
Definition hel_lcd.h:39
GPIO_TypeDef * BklPort
Definition hel_lcd.h:45