LCD HD44780 driver library v1.0.3
lcd_hd44780_def_char.h
Go to the documentation of this file.
1
12#ifndef _LCD_HD44780_DEF_CHAR_H_
13#define _LCD_HD44780_DEF_CHAR_H_
14
15#ifdef __cplusplus
16extern "C"
17{
18#endif /* __cplusplus */
19
20#include <stdint.h>
21#include "lcd_hd44780_config.h"
22
23#define LCD_CGRAM_BYTES_PER_CHAR 8
24#define DEF_CHAR_ADR_MASK 7
25#define CHAR_MAP_END '\0'
26
33 typedef struct
34 {
38
44 typedef struct
45 {
46 const uint8_t *char_0;
47 const uint8_t *char_1;
48 const uint8_t *char_2;
49 const uint8_t *char_3;
50 const uint8_t *char_4;
51 const uint8_t *char_5;
52 const uint8_t *char_6;
53 const uint8_t *char_7;
55
64 typedef struct
65 {
69
70 /**********************USER CHAR DECLARATION SECTION*******************************/
74 static const uint8_t Pol_e[8] = {0, 0, 14, 17, 31, 16, 14, 3};
75 static const uint8_t Pol_o[8] = {2, 4, 14, 17, 17, 17, 14, 0};
76 static const uint8_t Pol_s[8] = {2, 4, 14, 16, 14, 1, 30, 0};
77 static const uint8_t Pol_l[8] = {12, 4, 6, 12, 4, 4, 14, 0};
78 static const uint8_t Pol_c[8] = {2, 4, 14, 16, 16, 17, 14, 0};
79 static const uint8_t Pol_a[8] = {0, 0, 14, 1, 15, 17, 15, 3};
80 static const uint8_t Pol_n[8] = {2, 4, 22, 25, 17, 17, 17, 0};
81 static const uint8_t Zn_wody[8] = {0, 0, 0, 6, 9, 2, 4, 15};
82 // Add additional custom characters definitions here
83
84 /**********************USER CHAR CGRAM 'bank_1' DECLARATION SECTION*******************/
90 static char_bank_struct_t bank_1 = {
91 Pol_e,
92 Pol_o,
93 Pol_s,
94 Pol_l,
95 Pol_c,
96 Pol_a,
97 Pol_n,
98 Zn_wody,
99 };
100
108 {
117 };
118
133 static lcd_char_mapping_struct_t lcd_bank_1_def_chars_map[] = {
134 // HERE YOU CAN DEFINE MAPPING OF YOUR DEF CHAR TO ANY U8 ASCII CHAR
135 // Defined ASCII U8 Char will be displayed on LCD as mapped def char
136 // You can mapp more ASCI char to one def char. Look on example bellow
137 // {'³', bank_1_Pol_l}, /**< Extended ASCII '³' mapped to the custom character '³' (address = enum bank_1_Pol_l) */
138 // {'£', bank_1_Pol_l}, /**< Extended ASCII '£' mapped to the custom character '³' (address = enum bank_1_Pol_l) */
139
140 {'ê', bank_1_Pol_e},
141 {'ó', bank_1_Pol_o},
142 {'œ', bank_1_Pol_s},
143 {'Œ', bank_1_Pol_s},
144 {'³', bank_1_Pol_l},
145 {'£', bank_1_Pol_l},
146 {'æ', bank_1_Pol_c},
147 {'Æ', bank_1_Pol_c},
148 {'¹', bank_1_Pol_a},
149 {'ñ', bank_1_Pol_n},
150 {CHAR_MAP_END, 0}
151 };
152
163 static const lcd_bank_load_struct_t bank_1_load_data = {
164 &bank_1,
165 lcd_bank_1_def_chars_map,
166 };
167
168#ifdef __cplusplus
169}
170#endif /* __cplusplus */
171
172#endif /* _LCD_HD44780_DEF_CHAR_H_ */
LCD_CGRAM_BANK_1_e
Labels representing specific user defined chars collected in LCD_CGRAM_BANK_1_e. Label values are equ...
Definition: lcd_hd44780_def_char.h:108
@ bank_1_Pol_l
Label with value 3 for custom character 'Pol_l' at address 0x03 in bank_1 and LCD_CGRAM.
Definition: lcd_hd44780_def_char.h:112
@ bank_1_Pol_a
Label with value 5 for custom character 'Pol_a' at address 0x05 in bank_1 and LCD_CGRAM.
Definition: lcd_hd44780_def_char.h:114
@ bank_1_Zn_wody
Label with value 7 for custom character 'Zn_wody' at address 0x07 in bank_1 and LCD_CGRAM.
Definition: lcd_hd44780_def_char.h:116
@ bank_1_Pol_o
Label with value 1 for custom character 'Pol_o' at address 0x01 in bank_1 and LCD_CGRAM.
Definition: lcd_hd44780_def_char.h:110
@ bank_1_Pol_e
Label with value 0 for custom character 'Pol_e' at address 0x00 in bank_1 and LCD_CGRAM.
Definition: lcd_hd44780_def_char.h:109
@ bank_1_Pol_s
Label with value 2 for custom character 'Pol_s' at address 0x02 in bank_1 and LCD_CGRAM.
Definition: lcd_hd44780_def_char.h:111
@ bank_1_Pol_c
Label with value 4 for custom character 'Pol_c' at address 0x04 in bank_1 and LCD_CGRAM.
Definition: lcd_hd44780_def_char.h:113
@ bank_1_Pol_n
Label with value 6 for custom character 'Pol_n' at address 0x06 in bank_1 and LCD_CGRAM.
Definition: lcd_hd44780_def_char.h:115
Structure that contains pointers to 8 user predefined characters. Structure is used to define user ch...
Definition: lcd_hd44780_def_char.h:45
const uint8_t * char_7
Definition: lcd_hd44780_def_char.h:53
const uint8_t * char_6
Definition: lcd_hd44780_def_char.h:52
const uint8_t * char_0
Definition: lcd_hd44780_def_char.h:46
const uint8_t * char_4
Definition: lcd_hd44780_def_char.h:50
const uint8_t * char_3
Definition: lcd_hd44780_def_char.h:49
const uint8_t * char_5
Definition: lcd_hd44780_def_char.h:51
const uint8_t * char_1
Definition: lcd_hd44780_def_char.h:47
const uint8_t * char_2
Definition: lcd_hd44780_def_char.h:48
Definition: lcd_hd44780_def_char.h:65
lcd_char_mapping_struct_t * char_mapping_tab
Definition: lcd_hd44780_def_char.h:67
char_bank_struct_t * char_bank
Definition: lcd_hd44780_def_char.h:66
Structure for mapping ASCII characters to LCD memory equivalents.
Definition: lcd_hd44780_def_char.h:34
uint8_t lcd_def_char_addr
Definition: lcd_hd44780_def_char.h:36
char ascii_char
Definition: lcd_hd44780_def_char.h:35