Sonochan II 0.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
LCD_5110.h
Go to the documentation of this file.
1
17 #ifndef _LCD_5110_H_
18 #define _LCD_5110_H_
19
20
21 //===========================| Included libraries |============================
22 /* HAL for LCD module !!! Please include correct driver for used architecture!
23 * Also in included driver should be defined enumeration e_lcd_5110_status
24 */
25 #include "LCD_5110_HAL_AVR32_UC3A3_HW_interface.h"
26
27
37 #define LCD_5110_DEFAULT_AUTO_LF 0
38
48 #define LCD_5110_DEFAULT_AUTO_LCD_CLEAR 1
49
50
58 #define LCD_5110_DEFAULT_AUTO_LINE_CLEAR 1
59
60
67 #define LCD_5110_SUPPORT_RTOS 1
68
79 #define LCD_5110_RTOS_CREATE_MUTEX 1
80
81 //===========================| Additional includes |===========================
82 #if LCD_5110_SUPPORT_RTOS != 0
83 #include "FreeRTOS.h"
84 #include "task.h"
85 #include "queue.h"
86 #include "semphr.h"
87
88 extern xSemaphoreHandle mutexSPI;
89 #endif
90 //=================================| Macros |==================================
91
99 #if LCD_5110_SUPPORT_RTOS != 0
100 #define LCD_5110_LOCK_SPI_MODULE_IF_RTOS \
101 xSemaphoreTake( mutexSPI, portMAX_DELAY );
102 #else
103 #define LCD_5110_LOCK_SPI_MODULE_IF_RTOS
104 #endif
105
106
107 #if LCD_5110_SUPPORT_RTOS != 0
108 #define LCD_5110_UNLOCK_SPI_MODULE_IF_RTOS \
109 xSemaphoreGive( mutexSPI );
110 #else
111 #define LCD_5110_UNLOCK_SPI_MODULE_IF_RTOS
112 #endif
113
114 //===========================| Functions for user |============================
115
116 //=============================| Basic functions |=============================
124 e_lcd_5110_status LCD_5110_init(void);
125
134 e_lcd_5110_status LCD_5110_clear(void);
135
136
160 e_lcd_5110_status LCD_5110_write(const char * p_txt_to_show);
161
187 e_lcd_5110_status LCD_5110_write_xy(const char * p_txt_to_show,
188 int x_position, int y_line);
189
200 e_lcd_5110_status LCD_5110_clear_line(uint8_t y_line);
201
209 e_lcd_5110_status LCD_5110_set_X(uint8_t X_address);
210
218 e_lcd_5110_status LCD_5110_set_line(uint8_t y_line);
219
230 e_lcd_5110_status LCD_5110_write_to_line(uint8_t i_raw_data);
231
232
233
242 #define LCD_5110_backlight_on LCD_5110_HAL_backlight_on
243
252 #define LCD_5110_backlight_off LCD_5110_HAL_backlight_off
253
254 //============================| Runtime settings |=============================
264 void LCD_5110_auto_newline(uint8_t i_auto_LF_flag);
265
276 void LCD_5110_auto_clear_display(uint8_t i_auto_clear_flag);
277
287 void LCD_5110_auto_clear_line(uint8_t i_auto_clear_flag);
288 //============================| Special functions |============================
297 e_lcd_5110_status LCD_5110_write_hex8(uint8_t i_hex8);
298
299
308 e_lcd_5110_status LCD_5110_write_hex16(uint16_t i_hex16);
309
318 e_lcd_5110_status LCD_5110_write_hex32(uint32_t i_hex32);
319
320
329 e_lcd_5110_status LCD_5110_write_dec8_unsigned(uint8_t i_dec8);
330
331
340 e_lcd_5110_status LCD_5110_write_dec8_signed(int8_t i_dec8);
341
342
351 e_lcd_5110_status LCD_5110_write_dec16_unsigned(uint16_t i_dec16);
352
353
362 e_lcd_5110_status LCD_5110_write_dec16_signed(int16_t i_dec16);
363
364 //===========================| Low level functions |===========================
365
375 e_lcd_5110_status LCD_5110_send_data_byte(uint8_t i_data);
376
385 e_lcd_5110_status LCD_5110_send_command_byte(uint8_t i_cmd);
386 #endif