forked from Velho/stm32-demo-master
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lcd_display.h
71 lines (62 loc) · 1.56 KB
/
lcd_display.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* lcd_display.h
*
* Created on: Oct 27, 2021
* Author: Velho
* Edited: Petri Pihla
*/
#ifndef INC_LCD_DISPLAY_H_
#define INC_LCD_DISPLAY_H_
#include <sensor_datatype.h>
#include <stdint.h>
/**
* @brief
*
*/
void Display_Init();
/**
* @brief Updates lcd_buffer[] from data storage
*
* TODO: 1. get current mode from button.c
* 2. get value with that mode from data_storage.c
* 3. get string with that mode from lookup table
* some reason i do not understand why is this not working with variables
*
* why CubeIDE gives warnings when declaring
* this function as a static?
*/
void Update_Buffer();
/**
* @brief LCD Screen render function
*
* Writes Buffer to the LCD and jumps to a next line if \n
* is encountered. Current behavior with multiple \n is
* that it jumps to the second line every time.
* So we are expecting that 16x2 LCD is used.
*
* TODO: what happens when there is more than 16 chars on one line?
* do we need to handle that somehow?
*
* why CubeIDE gives warnings when declaring
* this function as a static?
*/
void Render_Buffer_to_LCD();
/**
* @brief Executes LCD rendering if it's needed.
*
* Compares lcd_buffer[] to lcd_current[]. If they are not the same then
* LCD screen is updated with the new data. Then the lcd_buffer[] is copied to
* lcd_current[] to store the current render of the screen.
*/
void Display_Draw();
/**
* @brief
*
*/
void Display_SetMode(SensorDataType mode);
/**
* @brief
*
*/
uint8_t Display_IsUpdating();
#endif /* INC_LCD_DISPLAY_H_ */