|
1 /* |
|
2 |
|
3 u8x8.h |
|
4 |
|
5 Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) |
|
6 |
|
7 Copyright (c) 2016, olikraus@gmail.com |
|
8 All rights reserved. |
|
9 |
|
10 Redistribution and use in source and binary forms, with or without modification, |
|
11 are permitted provided that the following conditions are met: |
|
12 |
|
13 * Redistributions of source code must retain the above copyright notice, this list |
|
14 of conditions and the following disclaimer. |
|
15 |
|
16 * Redistributions in binary form must reproduce the above copyright notice, this |
|
17 list of conditions and the following disclaimer in the documentation and/or other |
|
18 materials provided with the distribution. |
|
19 |
|
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
|
21 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, |
|
22 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
23 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
24 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
|
25 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
26 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
|
27 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
28 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
|
29 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
|
30 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
|
31 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
|
32 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
33 |
|
34 |
|
35 |
|
36 U8glib has several layers. Each layer is implemented with a callback function. |
|
37 This callback function handels the messages for the layer. |
|
38 |
|
39 The topmost level is the display layer. It includes the following messages: |
|
40 |
|
41 U8X8_MSG_DISPLAY_SETUP_MEMORY no communicaation with the display, setup memory ony |
|
42 U8X8_MSG_DISPLAY_INIT |
|
43 U8X8_MSG_DISPLAY_SET_FLIP_MODE |
|
44 U8X8_MSG_DISPLAY_SET_POWER_SAVE |
|
45 U8X8_MSG_DISPLAY_SET_CONTRAST |
|
46 U8X8_MSG_DISPLAY_DRAW_TILE |
|
47 |
|
48 A display driver may decided to breakdown these messages to a lower level interface or |
|
49 implement this functionality directly. |
|
50 |
|
51 |
|
52 One layer is the Command/Arg/Data interface. It can be used by the display layer |
|
53 to communicate with the display hardware. |
|
54 This layer only deals with data, commands and arguments. D/C line is unknown. |
|
55 U8X8_MSG_CAD_INIT |
|
56 U8X8_MSG_CAD_SET_I2C_ADR (obsolete) |
|
57 U8X8_MSG_CAD_SET_DEVICE (obsolete) |
|
58 U8X8_MSG_CAD_START_TRANSFER |
|
59 U8X8_MSG_CAD_SEND_CMD |
|
60 U8X8_MSG_CAD_SEND_ARG |
|
61 U8X8_MSG_CAD_SEND_DATA |
|
62 U8X8_MSG_CAD_END_TRANSFER |
|
63 |
|
64 The byte interface is there to send 1 byte (8 bits) to the display hardware. |
|
65 This layer depends on the hardware of a microcontroller, if a specific hardware |
|
66 should be used (I2C or SPI). |
|
67 If this interface is implemented via software, it may use the GPIO level for sending |
|
68 bytes. |
|
69 U8X8_MSG_BYTE_INIT |
|
70 U8X8_MSG_BYTE_SEND 30 |
|
71 U8X8_MSG_BYTE_SET_DC 31 |
|
72 U8X8_MSG_BYTE_START_TRANSFER |
|
73 U8X8_MSG_BYTE_END_TRANSFER |
|
74 U8X8_MSG_BYTE_SET_I2C_ADR (obsolete) |
|
75 U8X8_MSG_BYTE_SET_DEVICE (obsolete) |
|
76 |
|
77 GPIO and Delay |
|
78 U8X8_MSG_GPIO_INIT |
|
79 U8X8_MSG_DELAY_MILLI |
|
80 U8X8_MSG_DELAY_10MICRO |
|
81 U8X8_MSG_DELAY_100NANO |
|
82 U8X8_MSG_DELAY_NANO |
|
83 */ |
|
84 |
|
85 #ifndef _U8X8_H |
|
86 #define _U8X8_H |
|
87 |
|
88 /*==========================================*/ |
|
89 /* Global Defines */ |
|
90 |
|
91 /* Undefine this to remove u8x8_SetContrast function */ |
|
92 #define U8X8_WITH_SET_CONTRAST |
|
93 |
|
94 /* Define this for an additional user pointer inside the u8x8 data struct */ |
|
95 //#define U8X8_WITH_USER_PTR |
|
96 |
|
97 |
|
98 /* Undefine this to remove u8x8_SetFlipMode function */ |
|
99 /* 26 May 2016: Obsolete */ |
|
100 //#define U8X8_WITH_SET_FLIP_MODE |
|
101 |
|
102 /* Select 0 or 1 for the default flip mode. This is not affected by U8X8_WITH_FLIP_MODE */ |
|
103 /* Note: Not all display types support a mirror functon for the frame buffer */ |
|
104 /* 26 May 2016: Obsolete */ |
|
105 //#define U8X8_DEFAULT_FLIP_MODE 0 |
|
106 |
|
107 /*==========================================*/ |
|
108 /* Includes */ |
|
109 |
|
110 |
|
111 #include <stdint.h> |
|
112 #include <stdarg.h> |
|
113 #include <stddef.h> |
|
114 #include <limits.h> |
|
115 |
|
116 #if defined(__GNUC__) && defined(__AVR__) |
|
117 #include <avr/pgmspace.h> |
|
118 #endif |
|
119 |
|
120 /*==========================================*/ |
|
121 /* C++ compatible */ |
|
122 |
|
123 #ifdef __cplusplus |
|
124 extern "C" { |
|
125 #endif |
|
126 |
|
127 |
|
128 /*==========================================*/ |
|
129 /* U8G2 internal defines */ |
|
130 |
|
131 /* the following macro returns the first value for the normal mode */ |
|
132 /* or the second argument for the flip mode */ |
|
133 |
|
134 /* 26 May 2016: Obsolete |
|
135 #if U8X8_DEFAULT_FLIP_MODE == 0 |
|
136 #define U8X8_IF_DEFAULT_NORMAL_OR_FLIP(normal, flipmode) (normal) |
|
137 #else |
|
138 #define U8X8_IF_DEFAULT_NORMAL_OR_FLIP(normal, flipmode) (flipmode) |
|
139 #endif |
|
140 */ |
|
141 |
|
142 #ifdef __GNUC__ |
|
143 # define U8X8_NOINLINE __attribute__((noinline)) |
|
144 # define U8X8_SECTION(name) __attribute__ ((section (name))) |
|
145 # define U8X8_UNUSED __attribute__((unused)) |
|
146 #else |
|
147 # define U8X8_SECTION(name) |
|
148 # define U8X8_NOINLINE |
|
149 # define U8X8_UNUSED |
|
150 #endif |
|
151 |
|
152 #if defined(__GNUC__) && defined(__AVR__) |
|
153 # define U8X8_FONT_SECTION(name) U8X8_SECTION(".progmem." name) |
|
154 # define u8x8_pgm_read(adr) pgm_read_byte_near(adr) |
|
155 # define U8X8_PROGMEM PROGMEM |
|
156 #endif |
|
157 |
|
158 #if defined(ESP8266) |
|
159 uint8_t u8x8_pgm_read_esp(const uint8_t * addr); /* u8x8_8x8.c */ |
|
160 # define U8X8_FONT_SECTION(name) __attribute__((section(".text." name))) |
|
161 # define u8x8_pgm_read(adr) u8x8_pgm_read_esp(adr) |
|
162 # define U8X8_PROGMEM |
|
163 #endif |
|
164 |
|
165 |
|
166 |
|
167 #ifndef U8X8_FONT_SECTION |
|
168 # define U8X8_FONT_SECTION(name) |
|
169 #endif |
|
170 |
|
171 #ifndef u8x8_pgm_read |
|
172 # ifndef CHAR_BIT |
|
173 # define u8x8_pgm_read(adr) (*(const uint8_t *)(adr)) |
|
174 # else |
|
175 # if CHAR_BIT > 8 |
|
176 # define u8x8_pgm_read(adr) ((*(const uint8_t *)(adr)) & 0x0ff) |
|
177 # else |
|
178 # define u8x8_pgm_read(adr) (*(const uint8_t *)(adr)) |
|
179 # endif |
|
180 # endif |
|
181 #endif |
|
182 |
|
183 #ifndef U8X8_PROGMEM |
|
184 # define U8X8_PROGMEM |
|
185 #endif |
|
186 |
|
187 #ifdef ARDUINO |
|
188 #define U8X8_USE_PINS |
|
189 #endif |
|
190 |
|
191 /*==========================================*/ |
|
192 /* U8X8 typedefs and data structures */ |
|
193 |
|
194 |
|
195 typedef struct u8x8_struct u8x8_t; |
|
196 typedef struct u8x8_display_info_struct u8x8_display_info_t; |
|
197 typedef struct u8x8_tile_struct u8x8_tile_t; |
|
198 |
|
199 typedef uint8_t (*u8x8_msg_cb)(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
200 typedef uint16_t (*u8x8_char_cb)(u8x8_t *u8x8, uint8_t b); |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 //struct u8x8_mcd_struct |
|
206 //{ |
|
207 // u8x8_msg_cb cb; /* current callback function */ |
|
208 // u8x8_t *u8g2; /* pointer to the u8g2 parent to minimize the number of args */ |
|
209 // u8x8_mcd_t *next; |
|
210 //}; |
|
211 |
|
212 struct u8x8_tile_struct |
|
213 { |
|
214 uint8_t *tile_ptr; /* pointer to one or more tiles... should be "const" */ |
|
215 uint8_t cnt; /* number of tiles */ |
|
216 uint8_t x_pos; /* tile x position */ |
|
217 uint8_t y_pos; /* tile x position */ |
|
218 }; |
|
219 |
|
220 |
|
221 struct u8x8_display_info_struct |
|
222 { |
|
223 /* == general == */ |
|
224 |
|
225 uint8_t chip_enable_level; /* UC1601: 0 */ |
|
226 uint8_t chip_disable_level; /* opposite of chip_enable_level */ |
|
227 |
|
228 uint8_t post_chip_enable_wait_ns; /* UC1601: 5ns */ |
|
229 uint8_t pre_chip_disable_wait_ns; /* UC1601: 5ns */ |
|
230 uint8_t reset_pulse_width_ms; /* UC1601: 0.003ms --> 1ms */ |
|
231 uint8_t post_reset_wait_ms; /* UC1601: 6ms */ |
|
232 |
|
233 |
|
234 /* == SPI interface == */ |
|
235 |
|
236 /* after SDA has been applied, wait this much time for the SCK data takeover edge */ |
|
237 /* if this is smaller than sck_pulse_width_ns, then use the value from sck_pulse_width_ns */ |
|
238 uint8_t sda_setup_time_ns; /* UC1601: 12ns */ |
|
239 /* the pulse width of the the clock signal, cycle time is twice this value */ |
|
240 /* max freq is 1/(2*sck_pulse_width_ns) */ |
|
241 /* AVR: below 70: DIV2, 8 MHz, >= 70 --> 4MHz clock (DIV4) */ |
|
242 uint8_t sck_pulse_width_ns; /* UC1701: 50ns */ |
|
243 |
|
244 /* until here we have 8 bytes (uint8_t). Newly introduced for SPI.beginTransaction */ |
|
245 uint32_t sck_clock_hz; |
|
246 |
|
247 /* previous name "sck_takeover_edge" renamed to "spi_mode" */ |
|
248 /* bit 0 of spi_mode is equal to the value of the previous variable sck_takeover_edge, 20 Aug 16: This is wrong the bit is actually inverted */ |
|
249 /* SPI has four clock modes: */ |
|
250 /* 0: clock active high, data out on falling edge, clock default value is zero, takover on rising edge */ |
|
251 /* 1: clock active high, data out on rising edge, clock default value is zero, takover on falling edge */ |
|
252 /* 2: clock active low, data out on rising edge */ |
|
253 /* 3: clock active low, data out on falling edge */ |
|
254 /* most displays have clock mode 1 */ |
|
255 uint8_t spi_mode; |
|
256 |
|
257 /* == I2C == */ |
|
258 uint8_t i2c_bus_clock_100kHz; /* UC1601: 1000000000/275 = 37 *100k */ |
|
259 |
|
260 |
|
261 /* == 8 bit interface == */ |
|
262 |
|
263 /* how long to wait after all data line are set */ |
|
264 uint8_t data_setup_time_ns; /* UC1601: 30ns */ |
|
265 /* write enable pulse width */ |
|
266 uint8_t write_pulse_width_ns; /* UC1601: 40ns */ |
|
267 |
|
268 /* == layout == */ |
|
269 uint8_t tile_width; |
|
270 uint8_t tile_height; |
|
271 |
|
272 uint8_t default_x_offset; /* default x offset for the display */ |
|
273 uint8_t flipmode_x_offset; /* x offset, if flip mode is enabled */ |
|
274 |
|
275 /* pixel width is not used by the u8x8 procedures */ |
|
276 /* instead it will be used by the u8g2 procedures, because the pixel dimension can */ |
|
277 /* not always be calculated from the tile_width/_height */ |
|
278 /* the following conditions must be true: */ |
|
279 /* pixel_width <= tile_width*8 */ |
|
280 /* pixel_height <= tile_height*8 */ |
|
281 uint16_t pixel_width; |
|
282 uint16_t pixel_height; |
|
283 }; |
|
284 |
|
285 |
|
286 |
|
287 /* list of U8x8 pins */ |
|
288 #define U8X8_PIN_D0 0 |
|
289 #define U8X8_PIN_SPI_CLOCK 0 |
|
290 #define U8X8_PIN_D1 1 |
|
291 #define U8X8_PIN_SPI_DATA 1 |
|
292 #define U8X8_PIN_D2 2 |
|
293 #define U8X8_PIN_D3 3 |
|
294 #define U8X8_PIN_D4 4 |
|
295 #define U8X8_PIN_D5 5 |
|
296 #define U8X8_PIN_D6 6 |
|
297 #define U8X8_PIN_D7 7 |
|
298 |
|
299 #define U8X8_PIN_E 8 |
|
300 #define U8X8_PIN_CS 9 /* parallel, SPI */ |
|
301 #define U8X8_PIN_DC 10 /* parallel, SPI */ |
|
302 #define U8X8_PIN_RESET 11 /* parallel, SPI, I2C */ |
|
303 |
|
304 #define U8X8_PIN_I2C_CLOCK 12 /* 1 = Input/high impedance, 0 = drive low */ |
|
305 #define U8X8_PIN_I2C_DATA 13 /* 1 = Input/high impedance, 0 = drive low */ |
|
306 |
|
307 #define U8X8_PIN_CS1 14 /* KS0108 extra chip select */ |
|
308 #define U8X8_PIN_CS2 15 /* KS0108 extra chip select */ |
|
309 |
|
310 #define U8X8_PIN_OUTPUT_CNT 16 |
|
311 |
|
312 #define U8X8_PIN_MENU_SELECT 16 |
|
313 #define U8X8_PIN_MENU_NEXT 17 |
|
314 #define U8X8_PIN_MENU_PREV 18 |
|
315 #define U8X8_PIN_MENU_HOME 19 |
|
316 #define U8X8_PIN_MENU_UP 20 |
|
317 #define U8X8_PIN_MENU_DOWN 21 |
|
318 |
|
319 #define U8X8_PIN_INPUT_CNT 6 |
|
320 |
|
321 #ifdef U8X8_USE_PINS |
|
322 #define U8X8_PIN_CNT (U8X8_PIN_OUTPUT_CNT+U8X8_PIN_INPUT_CNT) |
|
323 #define U8X8_PIN_NONE 255 |
|
324 #endif |
|
325 |
|
326 struct u8x8_struct |
|
327 { |
|
328 const u8x8_display_info_t *display_info; |
|
329 u8x8_char_cb next_cb; /* procedure, which will be used to get the next char from the string */ |
|
330 u8x8_msg_cb display_cb; |
|
331 u8x8_msg_cb cad_cb; |
|
332 u8x8_msg_cb byte_cb; |
|
333 u8x8_msg_cb gpio_and_delay_cb; |
|
334 uint32_t bus_clock; /* can be used by the byte function to store the clock speed of the bus */ |
|
335 const uint8_t *font; |
|
336 uint16_t encoding; /* encoding result for utf8 decoder in next_cb */ |
|
337 uint8_t x_offset; /* copied from info struct, can be modified in flip mode */ |
|
338 uint8_t is_font_inverse_mode; /* 0: normal, 1: font glyphs are inverted */ |
|
339 uint8_t i2c_address; /* a valid i2c adr. Initially this is 255, but this is set to something usefull during DISPLAY_INIT */ |
|
340 /* i2c_address is the address for writing data to the display */ |
|
341 /* usually, the lowest bit must be zero for a valid address */ |
|
342 uint8_t i2c_started; /* for i2c interface */ |
|
343 uint8_t device_address; /* this is the device address, replacement for U8X8_MSG_CAD_SET_DEVICE */ |
|
344 uint8_t utf8_state; /* number of chars which are still to scan */ |
|
345 uint8_t gpio_result; /* return value from the gpio call (only for MENU keys at the moment) */ |
|
346 uint8_t debounce_default_pin_state; |
|
347 uint8_t debounce_last_pin_state; |
|
348 uint8_t debounce_state; |
|
349 uint8_t debounce_result_msg; /* result msg or event after debounce */ |
|
350 #ifdef U8X8_WITH_USER_PTR |
|
351 void *user_ptr; |
|
352 #endif |
|
353 #ifdef U8X8_USE_PINS |
|
354 uint8_t pins[U8X8_PIN_CNT]; /* defines a pinlist: Mainly a list of pins for the Arduino Envionment, use U8X8_PIN_xxx to access */ |
|
355 #endif |
|
356 }; |
|
357 |
|
358 #ifdef U8X8_WITH_USER_PTR |
|
359 #define u8x8_GetUserPtr(u8x8) ((u8x8)->user_ptr) |
|
360 #define u8x8_SetUserPtr(u8x8, p) ((u8x8)->user_ptr = (p)) |
|
361 #endif |
|
362 |
|
363 |
|
364 #define u8x8_GetCols(u8x8) ((u8x8)->display_info->tile_width) |
|
365 #define u8x8_GetRows(u8x8) ((u8x8)->display_info->tile_height) |
|
366 #define u8x8_GetI2CAddress(u8x8) ((u8x8)->i2c_address) |
|
367 #define u8x8_SetI2CAddress(u8x8, address) ((u8x8)->i2c_address = (address)) |
|
368 |
|
369 #define u8x8_SetGPIOResult(u8x8, val) ((u8x8)->gpio_result = (val)) |
|
370 #define u8x8_GetSPIClockPhase(u8x8) ((u8x8)->display_info->spi_mode & 0x01) /* 0 means rising edge */ |
|
371 #define u8x8_GetSPIClockPolarity(u8x8) (((u8x8)->display_info->spi_mode & 0x02) >> 1) |
|
372 #define u8x8_GetSPIClockDefaultLevel(u8x8) (((u8x8)->display_info->spi_mode & 0x02) >> 1) |
|
373 |
|
374 #define u8x8_GetFontCharWidth(u8x8) u8x8_pgm_read( (u8x8)->font + 2 ) |
|
375 #define u8x8_GetFontCharHeight(u8x8) u8x8_pgm_read( (u8x8)->font + 3 ) |
|
376 |
|
377 #ifdef U8X8_USE_PINS |
|
378 #define u8x8_SetPin(u8x8,pin,val) (u8x8)->pins[pin] = (val) |
|
379 #define u8x8_SetMenuSelectPin(u8x8, val) u8x8_SetPin((u8x8),U8X8_PIN_MENU_SELECT,(val)) |
|
380 #define u8x8_SetMenuNextPin(u8x8, val) u8x8_SetPin((u8x8),U8X8_PIN_MENU_NEXT,(val)) |
|
381 #define u8x8_SetMenuPrevPin(u8x8, val) u8x8_SetPin((u8x8),U8X8_PIN_MENU_PREV,(val)) |
|
382 #define u8x8_SetMenuHomePin(u8x8, val) u8x8_SetPin((u8x8),U8X8_PIN_MENU_HOME,(val)) |
|
383 #define u8x8_SetMenuUpPin(u8x8, val) u8x8_SetPin((u8x8),U8X8_PIN_MENU_UP,(val)) |
|
384 #define u8x8_SetMenuDownPin(u8x8, val) u8x8_SetPin((u8x8),U8X8_PIN_MENU_DOWN,(val)) |
|
385 #endif |
|
386 |
|
387 |
|
388 /*==========================================*/ |
|
389 /* u8log extension for u8x8 and u8g2 */ |
|
390 |
|
391 typedef struct u8log_struct u8log_t; |
|
392 |
|
393 |
|
394 /* redraw the specified line. */ |
|
395 typedef void (*u8log_cb)(u8log_t * u8log); |
|
396 |
|
397 struct u8log_struct |
|
398 { |
|
399 /* configuration */ |
|
400 void *aux_data; /* pointer to u8x8 or u8g2 */ |
|
401 uint8_t width, height; /* size of the terminal */ |
|
402 u8log_cb cb; /* callback redraw function */ |
|
403 uint8_t *screen_buffer; /* size must be width*heigh bytes */ |
|
404 uint8_t is_redraw_line_for_each_char; |
|
405 int8_t line_height_offset; /* extra offset for the line height (u8g2 only) */ |
|
406 |
|
407 /* internal data */ |
|
408 //uint8_t last_x, last_y; /* position of the last printed char */ |
|
409 uint8_t cursor_x, cursor_y; /* position of the cursor, might be off screen */ |
|
410 uint8_t redraw_line; /* redraw specific line if is_redraw_line is not 0 */ |
|
411 uint8_t is_redraw_line; |
|
412 uint8_t is_redraw_all; |
|
413 uint8_t is_redraw_all_required_for_next_nl; /* in nl mode, redraw all instead of current line */ |
|
414 }; |
|
415 |
|
416 |
|
417 /*==========================================*/ |
|
418 |
|
419 /* helper functions */ |
|
420 void u8x8_d_helper_display_setup_memory(u8x8_t *u8x8, const u8x8_display_info_t *display_info); |
|
421 void u8x8_d_helper_display_init(u8x8_t *u8g2); |
|
422 |
|
423 /* Display Interface */ |
|
424 |
|
425 /* |
|
426 Name: U8X8_MSG_DISPLAY_SETUP_MEMORY |
|
427 Args: None |
|
428 Tasks: |
|
429 1) setup u8g2->display_info |
|
430 copy u8g2->display_info->default_x_offset to u8g2->x_offset |
|
431 |
|
432 usually calls u8x8_d_helper_display_setup_memory() |
|
433 */ |
|
434 #define U8X8_MSG_DISPLAY_SETUP_MEMORY 9 |
|
435 |
|
436 /* |
|
437 Name: U8X8_MSG_DISPLAY_INIT |
|
438 Args: None |
|
439 Tasks: |
|
440 |
|
441 2) put interface into default state: |
|
442 execute u8x8_gpio_Init for port directions |
|
443 execute u8x8_cad_Init for default port levels |
|
444 3) set CS status (not clear, may be done in cad/byte interface |
|
445 4) execute display reset (gpio interface) |
|
446 5) send setup sequence to display, do not activate display, disable "power save" will follow |
|
447 */ |
|
448 #define U8X8_MSG_DISPLAY_INIT 10 |
|
449 |
|
450 /* |
|
451 Name: U8X8_MSG_DISPLAY_SET_POWER_SAVE |
|
452 Args: arg_int: 0: normal mode (RAM is visible on the display), 1: nothing is shown |
|
453 Tasks: |
|
454 Depending on arg_int, put the display into normal or power save mode. |
|
455 Send the corresponding sequence to the display. |
|
456 In power save mode, it must be possible to modify the RAM content. |
|
457 */ |
|
458 #define U8X8_MSG_DISPLAY_SET_POWER_SAVE 11 |
|
459 |
|
460 /* |
|
461 Name: U8X8_MSG_DISPLAY_SET_FLIP_MODE |
|
462 Args: arg_int: 0: normal mode, 1: flipped HW screen (180 degree) |
|
463 Tasks: |
|
464 Reprogramms the display controller to rotate the display by |
|
465 180 degree (arg_int = 1) or not (arg_int = 0) |
|
466 This may change u8g2->x_offset if the display is smaller than the controller ram |
|
467 This message should only be supported if U8X8_WITH_FLIP_MODE is defined. |
|
468 */ |
|
469 #define U8X8_MSG_DISPLAY_SET_FLIP_MODE 13 |
|
470 |
|
471 /* arg_int: 0..255 contrast value */ |
|
472 #define U8X8_MSG_DISPLAY_SET_CONTRAST 14 |
|
473 |
|
474 /* |
|
475 Name: U8X8_MSG_DISPLAY_DRAW_TILE |
|
476 Args: |
|
477 arg_int: How often to repeat this tile pattern |
|
478 arg_ptr: pointer to u8x8_tile_t |
|
479 uint8_t *tile_ptr; pointer to one or more tiles (number is "cnt") |
|
480 uint8_t cnt; number of tiles |
|
481 uint8_t x_pos; first tile x position |
|
482 uint8_t y_pos; first tile y position |
|
483 Tasks: |
|
484 One tile has exactly 8 bytes (8x8 pixel monochrome bitmap). |
|
485 The lowest bit of the first byte is the upper left corner |
|
486 The highest bit of the first byte is the lower left corner |
|
487 The lowest bit of the last byte is the upper right corner |
|
488 The highest bit of the last byte is the lower left corner |
|
489 "tile_ptr" is the address of a memory area, which contains |
|
490 one or more tiles. "cnt" will contain the exact number of |
|
491 tiles in the memory areay. The size of the memory area is 8*cnt; |
|
492 Multiple tiles in the memory area form a horizontal sequence, this |
|
493 means the first tile is drawn at x_pos/y_pos, the second tile is drawn |
|
494 at x_pos+1/y_pos, third at x_pos+2/y_pos. |
|
495 "arg_int" tells how often the tile sequence should be repeated: |
|
496 For example if "cnt" is two and tile_ptr points to tiles A and B, |
|
497 then for arg_int = 3, the following tile sequence will be drawn: |
|
498 ABABAB. Totally, cnt*arg_int tiles will be drawn. |
|
499 |
|
500 */ |
|
501 #define U8X8_MSG_DISPLAY_DRAW_TILE 15 |
|
502 |
|
503 |
|
504 /* |
|
505 Name: U8X8_MSG_DISPLAY_REFRESH |
|
506 Args: |
|
507 arg_int: - |
|
508 arg_ptr: - |
|
509 |
|
510 This was introduced for the SSD1606 eInk display. |
|
511 The problem is, that all RAM access will not appear on the screen |
|
512 unless a special command is executed. With this message, this command |
|
513 sequence is executed. |
|
514 Use |
|
515 void u8x8_RefreshDisplay(u8x8_t *u8x8) |
|
516 to send the message to the display handler. |
|
517 */ |
|
518 #define U8X8_MSG_DISPLAY_REFRESH 16 |
|
519 |
|
520 /*==========================================*/ |
|
521 /* u8x8_setup.c */ |
|
522 |
|
523 uint8_t u8x8_dummy_cb(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
524 |
|
525 /* |
|
526 Setup u8x8 object itself. This should be the very first function |
|
527 called on the new u8x8 object. After this call, assign the callback |
|
528 functions. Optional: Set the pins |
|
529 */ |
|
530 |
|
531 void u8x8_SetupDefaults(u8x8_t *u8x8); /* do not use this, use u8x8_Setup() instead */ |
|
532 |
|
533 void u8x8_Setup(u8x8_t *u8x8, u8x8_msg_cb display_cb, u8x8_msg_cb cad_cb, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); |
|
534 |
|
535 /*==========================================*/ |
|
536 /* u8x8_display.c */ |
|
537 uint8_t u8x8_DrawTile(u8x8_t *u8x8, uint8_t x, uint8_t y, uint8_t cnt, uint8_t *tile_ptr); |
|
538 |
|
539 /* |
|
540 After a call to u8x8_SetupDefaults, |
|
541 setup u8x8 memory structures & inform callbacks |
|
542 This function is also called from u8x8_Setup(), so do not call u8x8_SetupMemory() |
|
543 directly, but use u8x8_Setup() instead. |
|
544 */ |
|
545 void u8x8_SetupMemory(u8x8_t *u8x8); |
|
546 |
|
547 /* |
|
548 After calling u8x8_SetupMemory()/u8x8_Setup(), init the display hardware itself. |
|
549 This will will the first time, u8x8 talks to the display. |
|
550 It will init the display, but keep display in power save mode. |
|
551 Usually this command must be followed by u8x8_SetPowerSave() |
|
552 */ |
|
553 void u8x8_InitDisplay(u8x8_t *u8x8); |
|
554 /* wake up display from power save mode */ |
|
555 void u8x8_SetPowerSave(u8x8_t *u8x8, uint8_t is_enable); |
|
556 void u8x8_SetFlipMode(u8x8_t *u8x8, uint8_t mode); |
|
557 void u8x8_SetContrast(u8x8_t *u8x8, uint8_t value); |
|
558 void u8x8_ClearDisplayWithTile(u8x8_t *u8x8, const uint8_t *buf) U8X8_NOINLINE; |
|
559 void u8x8_ClearDisplay(u8x8_t *u8x8); // this does not work for u8g2 in some cases |
|
560 void u8x8_FillDisplay(u8x8_t *u8x8); |
|
561 void u8x8_RefreshDisplay(u8x8_t *u8x8); // make RAM content visible on the display (Dec 16: SSD1606 only) |
|
562 void u8x8_ClearLine(u8x8_t *u8x8, uint8_t line); |
|
563 |
|
564 |
|
565 |
|
566 /*==========================================*/ |
|
567 /* Command Arg Data (CAD) Interface */ |
|
568 |
|
569 /* |
|
570 U8X8_MSG_CAD_INIT |
|
571 no args |
|
572 call U8X8_MSG_BYTE_INIT |
|
573 setup default values for the I/O lines |
|
574 */ |
|
575 #define U8X8_MSG_CAD_INIT 20 |
|
576 |
|
577 |
|
578 #define U8X8_MSG_CAD_SEND_CMD 21 |
|
579 /* arg_int: cmd byte */ |
|
580 #define U8X8_MSG_CAD_SEND_ARG 22 |
|
581 /* arg_int: arg byte */ |
|
582 #define U8X8_MSG_CAD_SEND_DATA 23 |
|
583 /* arg_int: expected cs level after processing this msg */ |
|
584 #define U8X8_MSG_CAD_START_TRANSFER 24 |
|
585 /* arg_int: expected cs level after processing this msg */ |
|
586 #define U8X8_MSG_CAD_END_TRANSFER 25 |
|
587 /* arg_int = 0: disable chip, arg_int = 1: enable chip */ |
|
588 //#define U8X8_MSG_CAD_SET_I2C_ADR 26 |
|
589 //#define U8X8_MSG_CAD_SET_DEVICE 27 |
|
590 |
|
591 |
|
592 |
|
593 /* u8g_cad.c */ |
|
594 |
|
595 #define u8x8_cad_Init(u8x8) ((u8x8)->cad_cb((u8x8), U8X8_MSG_CAD_INIT, 0, NULL )) |
|
596 |
|
597 uint8_t u8x8_cad_SendCmd(u8x8_t *u8x8, uint8_t cmd) U8X8_NOINLINE; |
|
598 uint8_t u8x8_cad_SendArg(u8x8_t *u8x8, uint8_t arg) U8X8_NOINLINE; |
|
599 uint8_t u8x8_cad_SendMultipleArg(u8x8_t *u8x8, uint8_t cnt, uint8_t arg) U8X8_NOINLINE; |
|
600 uint8_t u8x8_cad_SendData(u8x8_t *u8x8, uint8_t cnt, uint8_t *data) U8X8_NOINLINE; |
|
601 uint8_t u8x8_cad_StartTransfer(u8x8_t *u8x8) U8X8_NOINLINE; |
|
602 uint8_t u8x8_cad_EndTransfer(u8x8_t *u8x8) U8X8_NOINLINE; |
|
603 void u8x8_cad_vsendf(u8x8_t * u8x8, const char *fmt, va_list va); |
|
604 void u8x8_SendF(u8x8_t * u8x8, const char *fmt, ...); |
|
605 |
|
606 /* |
|
607 #define U8X8_C(c0) (0x04), (c0) |
|
608 #define U8X8_CA(c0,a0) (0x05), (c0), (a0) |
|
609 #define U8X8_CAA(c0,a0,a1) (0x06), (c0), (a0), (a1) |
|
610 #define U8X8_DATA() (0x10) |
|
611 #define U8X8_D1(d0) (0x11), (d0) |
|
612 */ |
|
613 |
|
614 #define U8X8_C(c0) (U8X8_MSG_CAD_SEND_CMD), (c0) |
|
615 #define U8X8_A(a0) (U8X8_MSG_CAD_SEND_ARG), (a0) |
|
616 #define U8X8_CA(c0,a0) (U8X8_MSG_CAD_SEND_CMD), (c0), (U8X8_MSG_CAD_SEND_ARG), (a0) |
|
617 #define U8X8_CAA(c0,a0,a1) (U8X8_MSG_CAD_SEND_CMD), (c0), (U8X8_MSG_CAD_SEND_ARG), (a0), (U8X8_MSG_CAD_SEND_ARG), (a1) |
|
618 #define U8X8_CAAA(c0,a0,a1, a2) (U8X8_MSG_CAD_SEND_CMD), (c0), (U8X8_MSG_CAD_SEND_ARG), (a0), (U8X8_MSG_CAD_SEND_ARG), (a1), (U8X8_MSG_CAD_SEND_ARG), (a2) |
|
619 #define U8X8_CAAAA(c0,a0,a1,a2,a3) (U8X8_MSG_CAD_SEND_CMD), (c0), (U8X8_MSG_CAD_SEND_ARG), (a0), (U8X8_MSG_CAD_SEND_ARG), (a1), (U8X8_MSG_CAD_SEND_ARG), (a2), (U8X8_MSG_CAD_SEND_ARG), (a3) |
|
620 #define U8X8_AAC(a0,a1,c0) (U8X8_MSG_CAD_SEND_ARG), (a0), (U8X8_MSG_CAD_SEND_ARG), (a1), (U8X8_MSG_CAD_SEND_CMD), (c0) |
|
621 #define U8X8_D1(d0) (U8X8_MSG_CAD_SEND_DATA), (d0) |
|
622 |
|
623 #define U8X8_A4(a0,a1,a2,a3) U8X8_A(a0), U8X8_A(a1), U8X8_A(a2), U8X8_A(a3) |
|
624 #define U8X8_A8(a0,a1,a2,a3,a4,a5,a6,a7) U8X8_A4((a0), (a1), (a2), (a3)), U8X8_A4((a4), (a5), (a6), (a7)) |
|
625 |
|
626 |
|
627 #define U8X8_START_TRANSFER() (U8X8_MSG_CAD_START_TRANSFER) |
|
628 #define U8X8_END_TRANSFER() (U8X8_MSG_CAD_END_TRANSFER) |
|
629 #define U8X8_DLY(m) (0xfe),(m) /* delay in milli seconds */ |
|
630 #define U8X8_END() (0xff) |
|
631 |
|
632 void u8x8_cad_SendSequence(u8x8_t *u8x8, uint8_t const *data); |
|
633 uint8_t u8x8_cad_empty(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
634 uint8_t u8x8_cad_110(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
635 uint8_t u8x8_cad_001(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
636 uint8_t u8x8_cad_011(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
637 uint8_t u8x8_cad_100(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
638 uint8_t u8x8_cad_st7920_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
639 uint8_t u8x8_cad_ssd13xx_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
640 uint8_t u8x8_cad_ssd13xx_fast_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
641 uint8_t u8x8_cad_st75256_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
642 uint8_t u8x8_cad_ld7032_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
643 uint8_t u8x8_cad_uc16xx_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
644 |
|
645 |
|
646 /*==========================================*/ |
|
647 /* Byte Interface */ |
|
648 |
|
649 #define U8X8_MSG_BYTE_INIT U8X8_MSG_CAD_INIT |
|
650 #define U8X8_MSG_BYTE_SET_DC 32 |
|
651 |
|
652 #define U8X8_MSG_BYTE_SEND U8X8_MSG_CAD_SEND_DATA |
|
653 |
|
654 #define U8X8_MSG_BYTE_START_TRANSFER U8X8_MSG_CAD_START_TRANSFER |
|
655 #define U8X8_MSG_BYTE_END_TRANSFER U8X8_MSG_CAD_END_TRANSFER |
|
656 |
|
657 //#define U8X8_MSG_BYTE_SET_I2C_ADR U8X8_MSG_CAD_SET_I2C_ADR |
|
658 //#define U8X8_MSG_BYTE_SET_DEVICE U8X8_MSG_CAD_SET_DEVICE |
|
659 |
|
660 |
|
661 uint8_t u8x8_byte_SetDC(u8x8_t *u8x8, uint8_t dc) U8X8_NOINLINE; |
|
662 uint8_t u8x8_byte_SendByte(u8x8_t *u8x8, uint8_t byte) U8X8_NOINLINE; |
|
663 uint8_t u8x8_byte_SendBytes(u8x8_t *u8x8, uint8_t cnt, uint8_t *data) U8X8_NOINLINE; |
|
664 uint8_t u8x8_byte_StartTransfer(u8x8_t *u8x8); |
|
665 uint8_t u8x8_byte_EndTransfer(u8x8_t *u8x8); |
|
666 |
|
667 uint8_t u8x8_byte_empty(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
668 uint8_t u8x8_byte_4wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
669 uint8_t u8x8_byte_8bit_6800mode(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
670 uint8_t u8x8_byte_8bit_8080mode(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
671 uint8_t u8x8_byte_3wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
672 /* uint8_t u8x8_byte_st7920_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); */ |
|
673 void u8x8_byte_set_ks0108_cs(u8x8_t *u8x8, uint8_t arg) U8X8_NOINLINE; |
|
674 uint8_t u8x8_byte_ks0108(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
675 uint8_t u8x8_byte_ssd13xx_sw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); /* OBSOLETE! */ |
|
676 uint8_t u8x8_byte_sw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
677 uint8_t u8x8_byte_sed1520(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
678 |
|
679 |
|
680 /*==========================================*/ |
|
681 /* GPIO Interface */ |
|
682 |
|
683 |
|
684 /* |
|
685 U8X8_MSG_GPIO_AND_DELAY_INIT |
|
686 no args |
|
687 setup port directions, do not set IO levels, this is done with BYTE/CAD_INIT |
|
688 */ |
|
689 #define U8X8_MSG_GPIO_AND_DELAY_INIT 40 |
|
690 |
|
691 /* arg_int: milliseconds */ |
|
692 #define U8X8_MSG_DELAY_MILLI 41 |
|
693 |
|
694 /* 10MICRO and 100NANO are not used at the moment */ |
|
695 #define U8X8_MSG_DELAY_10MICRO 42 |
|
696 #define U8X8_MSG_DELAY_100NANO 43 |
|
697 |
|
698 |
|
699 #define U8X8_MSG_DELAY_NANO 44 |
|
700 /* delay of one i2c unit, should be 5us for 100K, and 1.25us for 400K */ |
|
701 #define U8X8_MSG_DELAY_I2C 45 |
|
702 |
|
703 #define U8X8_MSG_GPIO(x) (64+(x)) |
|
704 #ifdef U8X8_USE_PINS |
|
705 #define u8x8_GetPinIndex(u8x8, msg) ((msg)&0x3f) |
|
706 #define u8x8_GetPinValue(u8x8, msg) ((u8x8)->pins[(msg)&0x3f]) |
|
707 #endif |
|
708 |
|
709 #define U8X8_MSG_GPIO_D0 U8X8_MSG_GPIO(U8X8_PIN_D0) |
|
710 #define U8X8_MSG_GPIO_SPI_CLOCK U8X8_MSG_GPIO(U8X8_PIN_SPI_CLOCK) |
|
711 #define U8X8_MSG_GPIO_D1 U8X8_MSG_GPIO(U8X8_PIN_D1) |
|
712 #define U8X8_MSG_GPIO_SPI_DATA U8X8_MSG_GPIO(U8X8_PIN_SPI_DATA) |
|
713 #define U8X8_MSG_GPIO_D2 U8X8_MSG_GPIO(U8X8_PIN_D2) |
|
714 #define U8X8_MSG_GPIO_D3 U8X8_MSG_GPIO(U8X8_PIN_D3) |
|
715 #define U8X8_MSG_GPIO_D4 U8X8_MSG_GPIO(U8X8_PIN_D4) |
|
716 #define U8X8_MSG_GPIO_D5 U8X8_MSG_GPIO(U8X8_PIN_D5) |
|
717 #define U8X8_MSG_GPIO_D6 U8X8_MSG_GPIO(U8X8_PIN_D6) |
|
718 #define U8X8_MSG_GPIO_D7 U8X8_MSG_GPIO(U8X8_PIN_D7) |
|
719 #define U8X8_MSG_GPIO_E U8X8_MSG_GPIO(U8X8_PIN_E) // used as E1 for the SED1520 |
|
720 #define U8X8_MSG_GPIO_CS U8X8_MSG_GPIO(U8X8_PIN_CS) // used as E2 for the SED1520 |
|
721 #define U8X8_MSG_GPIO_DC U8X8_MSG_GPIO(U8X8_PIN_DC) |
|
722 #define U8X8_MSG_GPIO_RESET U8X8_MSG_GPIO(U8X8_PIN_RESET) |
|
723 #define U8X8_MSG_GPIO_I2C_CLOCK U8X8_MSG_GPIO(U8X8_PIN_I2C_CLOCK) |
|
724 #define U8X8_MSG_GPIO_I2C_DATA U8X8_MSG_GPIO(U8X8_PIN_I2C_DATA) |
|
725 |
|
726 |
|
727 #define U8X8_MSG_GPIO_CS1 U8X8_MSG_GPIO(U8X8_PIN_CS1) /* KS0108 extra chip select */ |
|
728 #define U8X8_MSG_GPIO_CS2 U8X8_MSG_GPIO(U8X8_PIN_CS2) /* KS0108 extra chip select */ |
|
729 |
|
730 |
|
731 /* these message expect the return value in u8x8->gpio_result */ |
|
732 #define U8X8_MSG_GPIO_MENU_SELECT U8X8_MSG_GPIO(U8X8_PIN_MENU_SELECT) |
|
733 #define U8X8_MSG_GPIO_MENU_NEXT U8X8_MSG_GPIO(U8X8_PIN_MENU_NEXT) |
|
734 #define U8X8_MSG_GPIO_MENU_PREV U8X8_MSG_GPIO(U8X8_PIN_MENU_PREV) |
|
735 #define U8X8_MSG_GPIO_MENU_HOME U8X8_MSG_GPIO(U8X8_PIN_MENU_HOME) |
|
736 #define U8X8_MSG_GPIO_MENU_UP U8X8_MSG_GPIO(U8X8_PIN_MENU_UP) |
|
737 #define U8X8_MSG_GPIO_MENU_DOWN U8X8_MSG_GPIO(U8X8_PIN_MENU_DOWN) |
|
738 |
|
739 |
|
740 #define u8x8_gpio_Init(u8x8) ((u8x8)->gpio_and_delay_cb((u8x8), U8X8_MSG_GPIO_AND_DELAY_INIT, 0, NULL )) |
|
741 |
|
742 |
|
743 /* |
|
744 #define u8x8_gpio_SetDC(u8x8, v) ((u8x8)->gpio_and_delay_cb((u8x8), U8X8_MSG_GPIO_DC, (v), NULL )) |
|
745 #define u8x8_gpio_SetCS(u8x8, v) ((u8x8)->gpio_and_delay_cb((u8x8), U8X8_MSG_GPIO_CS, (v), NULL )) |
|
746 #define u8x8_gpio_SetReset(u8x8, v) ((u8x8)->gpio_and_delay_cb((u8x8), U8X8_MSG_GPIO_RESET, (v), NULL )) |
|
747 */ |
|
748 |
|
749 #define u8x8_gpio_SetDC(u8x8, v) u8x8_gpio_call(u8x8, U8X8_MSG_GPIO_DC, (v)) |
|
750 #define u8x8_gpio_SetCS(u8x8, v) u8x8_gpio_call(u8x8, U8X8_MSG_GPIO_CS, (v)) |
|
751 #define u8x8_gpio_SetReset(u8x8, v) u8x8_gpio_call(u8x8, U8X8_MSG_GPIO_RESET, (v)) |
|
752 #define u8x8_gpio_SetSPIClock(u8x8, v) u8x8_gpio_call(u8x8, U8X8_MSG_GPIO_SPI_CLOCK, (v)) |
|
753 #define u8x8_gpio_SetSPIData(u8x8, v) u8x8_gpio_call(u8x8, U8X8_MSG_GPIO_SPI_DATA, (v)) |
|
754 #define u8x8_gpio_SetI2CClock(u8x8, v) u8x8_gpio_call(u8x8, U8X8_MSG_GPIO_I2C_CLOCK, (v)) |
|
755 #define u8x8_gpio_SetI2CData(u8x8, v) u8x8_gpio_call(u8x8, U8X8_MSG_GPIO_I2C_DATA, (v)) |
|
756 |
|
757 void u8x8_gpio_call(u8x8_t *u8x8, uint8_t msg, uint8_t arg) U8X8_NOINLINE; |
|
758 |
|
759 #define u8x8_gpio_Delay(u8x8, msg, dly) u8x8_gpio_call((u8x8), (msg), (dly)) |
|
760 //void u8x8_gpio_Delay(u8x8_t *u8x8, uint8_t msg, uint8_t dly) U8X8_NOINLINE; |
|
761 |
|
762 |
|
763 /*==========================================*/ |
|
764 /* u8x8_debounce.c */ |
|
765 /* return U8X8_MSG_GPIO_MENU_xxxxx messages */ |
|
766 uint8_t u8x8_GetMenuEvent(u8x8_t *u8x8); |
|
767 |
|
768 /*==========================================*/ |
|
769 /* u8x8_d_stdio.c */ |
|
770 void u8x8_SetupStdio(u8x8_t *u8x8); |
|
771 |
|
772 /*==========================================*/ |
|
773 /* u8x8_d_sdl_128x64.c */ |
|
774 void u8x8_Setup_SDL_128x64(u8x8_t *u8x8); |
|
775 void u8x8_Setup_SDL_240x160(u8x8_t *u8x8); |
|
776 int u8g_sdl_get_key(void); |
|
777 |
|
778 /*==========================================*/ |
|
779 /* u8x8_d_tga.c */ |
|
780 void u8x8_Setup_TGA_DESC(u8x8_t *u8x8); |
|
781 void u8x8_Setup_TGA_LCD(u8x8_t *u8x8); |
|
782 void tga_save(const char *name); |
|
783 |
|
784 /*==========================================*/ |
|
785 /* u8x8_d_bitmap.c */ |
|
786 uint8_t u8x8_GetBitmapPixel(u8x8_t *u8x8, uint16_t x, uint16_t y); |
|
787 void u8x8_SaveBitmapTGA(u8x8_t *u8x8, const char *filename); |
|
788 void u8x8_SetupBitmap(u8x8_t *u8x8, uint16_t pixel_width, uint16_t pixel_height); |
|
789 uint8_t u8x8_ConnectBitmapToU8x8(u8x8_t *u8x8); |
|
790 |
|
791 /*==========================================*/ |
|
792 /* u8x8_d_utf8.c */ |
|
793 void u8x8_Setup_Utf8(u8x8_t *u8x8); /* stdout UTF-8 display */ |
|
794 void utf8_show(void); /* show content of UTF-8 frame buffer */ |
|
795 |
|
796 |
|
797 /*==========================================*/ |
|
798 |
|
799 /* u8x8_setup.c */ |
|
800 uint8_t u8x8_d_null_cb(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
801 |
|
802 /* u8x8_d_XXX.c */ |
|
803 uint8_t u8x8_d_uc1701_ea_dogs102(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
804 uint8_t u8x8_d_uc1701_mini12864(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
805 uint8_t u8x8_d_ssd1305_128x32_noname(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
806 uint8_t u8x8_d_ssd1305_128x32_adafruit(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
807 uint8_t u8x8_d_ssd1305_128x64_adafruit(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
808 uint8_t u8x8_d_ssd1306_128x64_noname(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
809 uint8_t u8x8_d_ssd1306_128x64_vcomh0(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
810 uint8_t u8x8_d_ssd1306_128x64_alt0(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
811 uint8_t u8x8_d_ssd1309_128x64_noname0(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
812 uint8_t u8x8_d_ssd1309_128x64_noname2(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
813 uint8_t u8x8_d_sh1106_128x64_noname(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
814 uint8_t u8x8_d_sh1106_128x64_vcomh0(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
815 uint8_t u8x8_d_sh1106_128x64_winstar(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
816 uint8_t u8x8_d_sh1106_72x40_wise(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
817 uint8_t u8x8_d_sh1106_64x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
818 uint8_t u8x8_d_sh1107_64x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
819 uint8_t u8x8_d_sh1107_seeed_96x96(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
820 uint8_t u8x8_d_sh1107_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
821 uint8_t u8x8_d_sh1107_pimoroni_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
822 uint8_t u8x8_d_sh1107_seeed_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
823 uint8_t u8x8_d_sh1108_160x160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
824 uint8_t u8x8_d_sh1122_256x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
825 uint8_t u8x8_d_st7920_192x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
826 uint8_t u8x8_d_st7920_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
827 uint8_t u8x8_d_ssd1306_128x32_univision(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
828 uint8_t u8x8_d_ssd1306_128x32_winstar(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
829 uint8_t u8x8_d_ssd1306_64x48_er(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
830 uint8_t u8x8_d_ssd1306_48x64_winstar(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
831 uint8_t u8x8_d_ssd1306_64x32_noname(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
832 uint8_t u8x8_d_ssd1306_64x32_1f(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
833 uint8_t u8x8_d_ssd1306_96x16_er(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
834 uint8_t u8x8_d_ls013b7dh03_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
835 uint8_t u8x8_d_ls027b7dh01_400x240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
836 uint8_t u8x8_d_ls013b7dh05_144x168(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
837 uint8_t u8x8_d_st7511_avd_320x240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
838 uint8_t u8x8_d_st7528_nhd_c160100(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
839 uint8_t u8x8_d_st7565_ea_dogm128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
840 uint8_t u8x8_d_st7565_lm6063(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
841 uint8_t u8x8_d_st7565_64128n(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
842 uint8_t u8x8_d_st7565_ea_dogm132(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
843 uint8_t u8x8_d_st7565_zolen_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
844 uint8_t u8x8_d_st7565_nhd_c12832(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
845 uint8_t u8x8_d_st7565_nhd_c12864(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
846 uint8_t u8x8_d_st7565_jlx12864(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
847 uint8_t u8x8_d_st7565_lm6059(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
848 uint8_t u8x8_d_st7565_lx12864(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
849 uint8_t u8x8_d_st7565_erc12864(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
850 uint8_t u8x8_d_st7565_erc12864_alt(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); /* issue #790 */ |
|
851 uint8_t u8x8_d_st7567_pi_132x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
852 uint8_t u8x8_d_st7567_jlx12864(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
853 uint8_t u8x8_d_st7567_enh_dg128064(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
854 uint8_t u8x8_d_st7567_enh_dg128064i(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
855 uint8_t u8x8_d_st7567_64x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
856 uint8_t u8x8_d_st7586s_s028hn118a(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
857 uint8_t u8x8_d_st7586s_erc240160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
858 uint8_t u8x8_d_st7588_jlx12864(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
859 uint8_t u8x8_d_st75256_jlx256128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
860 uint8_t u8x8_d_st75256_wo256x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
861 uint8_t u8x8_d_st75256_jlx256160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
862 uint8_t u8x8_d_st75256_jlx256160m(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
863 uint8_t u8x8_d_st75256_jlx256160_alt(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
864 uint8_t u8x8_d_st75256_jlx240160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
865 uint8_t u8x8_d_st75256_jlx25664(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
866 uint8_t u8x8_d_st75256_jlx172104(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
867 uint8_t u8x8_d_st75256_jlx19296(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
868 uint8_t u8x8_d_st75320_jlx320240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); /* https://github.com/olikraus/u8g2/issues/921 */ |
|
869 uint8_t u8x8_d_nt7534_tg12864r(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); /* u8x8_d_st7565.c */ |
|
870 uint8_t u8x8_d_ld7032_60x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
871 uint8_t u8x8_d_t6963_240x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
872 uint8_t u8x8_d_t6963_240x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
873 uint8_t u8x8_d_t6963_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
874 uint8_t u8x8_d_t6963_128x64_alt(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
875 uint8_t u8x8_d_t6963_160x80(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
876 uint8_t u8x8_d_t6963_256x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
877 uint8_t u8x8_d_ssd1316_128x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
878 uint8_t u8x8_d_ssd1317_96x96(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
879 uint8_t u8x8_d_ssd1318_128x96(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
880 uint8_t u8x8_d_ssd1318_128x96_xcp(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
881 uint8_t u8x8_d_ssd1322_nhd_256x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
882 uint8_t u8x8_d_ssd1322_nhd_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
883 uint8_t u8x8_d_a2printer_384x240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
884 uint8_t u8x8_d_sed1330_240x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
885 uint8_t u8x8_d_ra8835_nhd_240x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
886 uint8_t u8x8_d_ra8835_320x240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
887 uint8_t u8x8_d_ssd1325_nhd_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
888 uint8_t u8x8_d_ssd0323_os128064(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
889 uint8_t u8x8_d_ssd1327_seeed_96x96(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
890 uint8_t u8x8_d_ssd1327_ea_w128128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
891 uint8_t u8x8_d_ssd1327_midas_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
892 uint8_t u8x8_d_ssd1327_ws_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
893 uint8_t u8x8_d_ssd1326_er_256x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
894 uint8_t u8x8_d_ssd1329_128x96_noname(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
895 uint8_t u8x8_d_uc1601_128x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
896 uint8_t u8x8_d_uc1604_jlx19264(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
897 uint8_t u8x8_d_uc1608_erc24064(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
898 uint8_t u8x8_d_uc1608_erc240120(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
899 uint8_t u8x8_d_uc1608_240x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
900 uint8_t u8x8_d_uc1610_ea_dogxl160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
901 uint8_t u8x8_d_uc1611_ea_dogm240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
902 uint8_t u8x8_d_uc1611_ea_dogxl240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
903 uint8_t u8x8_d_uc1611_ew50850(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); /* 240x160 */ |
|
904 uint8_t u8x8_d_uc1611_cg160160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); /* 160x160 */ |
|
905 uint8_t u8x8_d_uc1617_jlx128128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
906 uint8_t u8x8_d_uc1638_160x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
907 uint8_t u8x8_d_ks0108_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
908 uint8_t u8x8_d_ks0108_erm19264(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
909 uint8_t u8x8_d_sbn1661_122x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
910 uint8_t u8x8_d_sed1520_122x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
911 uint8_t u8x8_d_pcd8544_84x48(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
912 uint8_t u8x8_d_pcf8812_96x65(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
913 uint8_t u8x8_d_hx1230_96x68(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
914 uint8_t u8x8_d_ssd1606_172x72(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
915 uint8_t u8x8_d_ssd1607_200x200(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
916 uint8_t u8x8_d_ssd1607_v2_200x200(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
917 uint8_t u8x8_d_ssd1607_gd_200x200(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
918 uint8_t u8x8_d_ssd1607_ws_200x200(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); /* issue 637 */ |
|
919 uint8_t u8x8_d_il3820_296x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
920 uint8_t u8x8_d_il3820_v2_296x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
921 uint8_t u8x8_d_lc7981_160x80(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
922 uint8_t u8x8_d_lc7981_160x160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
923 uint8_t u8x8_d_lc7981_240x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
924 uint8_t u8x8_d_lc7981_240x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
925 uint8_t u8x8_d_ist3020_erc19264(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
926 uint8_t u8x8_d_ist7920_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
927 uint8_t u8x8_d_max7219_64x8(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
928 uint8_t u8x8_d_max7219_32x8(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
929 uint8_t u8x8_d_max7219_8x8(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); |
|
930 |
|
931 |
|
932 |
|
933 /*==========================================*/ |
|
934 /* u8x8_8x8.c */ |
|
935 |
|
936 uint16_t u8x8_upscale_byte(uint8_t x) U8X8_NOINLINE; |
|
937 |
|
938 |
|
939 void u8x8_utf8_init(u8x8_t *u8x8); |
|
940 uint16_t u8x8_ascii_next(u8x8_t *u8x8, uint8_t b); |
|
941 uint16_t u8x8_utf8_next(u8x8_t *u8x8, uint8_t b); |
|
942 // the following two functions are replaced by the init/next functions |
|
943 //uint16_t u8x8_get_encoding_from_utf8_string(const char **str); |
|
944 //uint16_t u8x8_get_char_from_string(const char **str); |
|
945 |
|
946 void u8x8_SetFont(u8x8_t *u8x8, const uint8_t *font_8x8); |
|
947 void u8x8_DrawGlyph(u8x8_t *u8x8, uint8_t x, uint8_t y, uint8_t encoding); |
|
948 void u8x8_Draw2x2Glyph(u8x8_t *u8x8, uint8_t x, uint8_t y, uint8_t encoding); |
|
949 void u8x8_Draw1x2Glyph(u8x8_t *u8x8, uint8_t x, uint8_t y, uint8_t encoding); |
|
950 uint8_t u8x8_DrawString(u8x8_t *u8x8, uint8_t x, uint8_t y, const char *s); |
|
951 uint8_t u8x8_DrawUTF8(u8x8_t *u8x8, uint8_t x, uint8_t y, const char *s); /* return number of glyps */ |
|
952 uint8_t u8x8_Draw2x2String(u8x8_t *u8x8, uint8_t x, uint8_t y, const char *s); |
|
953 uint8_t u8x8_Draw2x2UTF8(u8x8_t *u8x8, uint8_t x, uint8_t y, const char *s); |
|
954 uint8_t u8x8_Draw1x2String(u8x8_t *u8x8, uint8_t x, uint8_t y, const char *s); |
|
955 uint8_t u8x8_Draw1x2UTF8(u8x8_t *u8x8, uint8_t x, uint8_t y, const char *s); |
|
956 uint8_t u8x8_GetUTF8Len(u8x8_t *u8x8, const char *s); |
|
957 #define u8x8_SetInverseFont(u8x8, b) (u8x8)->is_font_inverse_mode = (b) |
|
958 |
|
959 /*==========================================*/ |
|
960 /* itoa procedures */ |
|
961 const char *u8x8_u8toa(uint8_t v, uint8_t d); |
|
962 const char *u8x8_u16toa(uint16_t v, uint8_t d); |
|
963 |
|
964 |
|
965 /*==========================================*/ |
|
966 /* u8x8_string.c */ |
|
967 |
|
968 uint8_t u8x8_GetStringLineCnt(const char *str); /* return 0 for str==NULL */ |
|
969 const char *u8x8_GetStringLineStart(uint8_t line_idx, const char *str ); |
|
970 void u8x8_CopyStringLine(char *dest, uint8_t line_idx, const char *str); |
|
971 /* draw one line, consider \t for center */ |
|
972 uint8_t u8x8_DrawUTF8Line(u8x8_t *u8x8, uint8_t x, uint8_t y, uint8_t w, const char *s); |
|
973 /* draw multiple lines, handle \t */ |
|
974 uint8_t u8x8_DrawUTF8Lines(u8x8_t *u8x8, uint8_t x, uint8_t y, uint8_t w, const char *s); |
|
975 |
|
976 /*==========================================*/ |
|
977 |
|
978 /* u8x8_selection_list.c */ |
|
979 struct _u8sl_struct |
|
980 { |
|
981 uint8_t visible; /* number of visible elements in the menu */ |
|
982 uint8_t total; /* total number of elements in the menu */ |
|
983 uint8_t first_pos; /* position of the first visible line */ |
|
984 uint8_t current_pos; /* current cursor position, starts at 0 */ |
|
985 |
|
986 uint8_t x; /* u8x8 only, not used in u8g2 */ |
|
987 uint8_t y; /* u8x8 only, not used in u8g2 */ |
|
988 }; |
|
989 typedef struct _u8sl_struct u8sl_t; |
|
990 |
|
991 typedef void (*u8x8_sl_cb)(u8x8_t *u8x8, u8sl_t *u8sl, uint8_t idx, const void *aux); |
|
992 |
|
993 void u8sl_Next(u8sl_t *u8sl); |
|
994 void u8sl_Prev(u8sl_t *u8sl); |
|
995 |
|
996 uint8_t u8x8_UserInterfaceSelectionList(u8x8_t *u8x8, const char *title, uint8_t start_pos, const char *sl); |
|
997 |
|
998 /*==========================================*/ |
|
999 |
|
1000 /* u8x8_message.c */ |
|
1001 uint8_t u8x8_UserInterfaceMessage(u8x8_t *u8x8, const char *title1, const char *title2, const char *title3, const char *buttons); |
|
1002 |
|
1003 /*==========================================*/ |
|
1004 |
|
1005 /* u8x8_input_value.c */ |
|
1006 |
|
1007 uint8_t u8x8_UserInterfaceInputValue(u8x8_t *u8x8, const char *title, const char *pre, uint8_t *value, uint8_t lo, uint8_t hi, uint8_t digits, const char *post); |
|
1008 |
|
1009 /*==========================================*/ |
|
1010 /* u8log.c */ |
|
1011 void u8log_Init(u8log_t *u8log, uint8_t width, uint8_t height, uint8_t *buf); |
|
1012 void u8log_SetCallback(u8log_t *u8log, u8log_cb cb, void *aux_data); |
|
1013 void u8log_SetRedrawMode(u8log_t *u8log, uint8_t is_redraw_line_for_each_char); |
|
1014 void u8log_SetLineHeightOffset(u8log_t *u8log, int8_t line_height_offset); |
|
1015 void u8log_WriteString(u8log_t *u8log, const char *s) U8X8_NOINLINE; |
|
1016 void u8log_WriteChar(u8log_t *u8log, uint8_t c) U8X8_NOINLINE; |
|
1017 void u8log_WriteHex8(u8log_t *u8log, uint8_t b) U8X8_NOINLINE; |
|
1018 void u8log_WriteHex16(u8log_t *u8log, uint16_t v); |
|
1019 void u8log_WriteHex32(u8log_t *u8log, uint32_t v); |
|
1020 void u8log_WriteDec8(u8log_t *u8log, uint8_t v, uint8_t d); |
|
1021 void u8log_WriteDec16(u8log_t *u8log, uint16_t v, uint8_t d); |
|
1022 |
|
1023 /*==========================================*/ |
|
1024 /* u8log_u8x8.c */ |
|
1025 void u8x8_DrawLog(u8x8_t *u8x8, uint8_t x, uint8_t y, u8log_t *u8log); |
|
1026 void u8log_u8x8_cb(u8log_t * u8log); |
|
1027 |
|
1028 |
|
1029 /*==========================================*/ |
|
1030 /* start font list */ |
|
1031 extern const uint8_t u8x8_font_amstrad_cpc_extended_f[] U8X8_FONT_SECTION("u8x8_font_amstrad_cpc_extended_f"); |
|
1032 extern const uint8_t u8x8_font_amstrad_cpc_extended_r[] U8X8_FONT_SECTION("u8x8_font_amstrad_cpc_extended_r"); |
|
1033 extern const uint8_t u8x8_font_amstrad_cpc_extended_n[] U8X8_FONT_SECTION("u8x8_font_amstrad_cpc_extended_n"); |
|
1034 extern const uint8_t u8x8_font_amstrad_cpc_extended_u[] U8X8_FONT_SECTION("u8x8_font_amstrad_cpc_extended_u"); |
|
1035 extern const uint8_t u8x8_font_5x7_f[] U8X8_FONT_SECTION("u8x8_font_5x7_f"); |
|
1036 extern const uint8_t u8x8_font_5x7_r[] U8X8_FONT_SECTION("u8x8_font_5x7_r"); |
|
1037 extern const uint8_t u8x8_font_5x7_n[] U8X8_FONT_SECTION("u8x8_font_5x7_n"); |
|
1038 extern const uint8_t u8x8_font_5x8_f[] U8X8_FONT_SECTION("u8x8_font_5x8_f"); |
|
1039 extern const uint8_t u8x8_font_5x8_r[] U8X8_FONT_SECTION("u8x8_font_5x8_r"); |
|
1040 extern const uint8_t u8x8_font_5x8_n[] U8X8_FONT_SECTION("u8x8_font_5x8_n"); |
|
1041 extern const uint8_t u8x8_font_8x13_1x2_f[] U8X8_FONT_SECTION("u8x8_font_8x13_1x2_f"); |
|
1042 extern const uint8_t u8x8_font_8x13_1x2_r[] U8X8_FONT_SECTION("u8x8_font_8x13_1x2_r"); |
|
1043 extern const uint8_t u8x8_font_8x13_1x2_n[] U8X8_FONT_SECTION("u8x8_font_8x13_1x2_n"); |
|
1044 extern const uint8_t u8x8_font_8x13B_1x2_f[] U8X8_FONT_SECTION("u8x8_font_8x13B_1x2_f"); |
|
1045 extern const uint8_t u8x8_font_8x13B_1x2_r[] U8X8_FONT_SECTION("u8x8_font_8x13B_1x2_r"); |
|
1046 extern const uint8_t u8x8_font_8x13B_1x2_n[] U8X8_FONT_SECTION("u8x8_font_8x13B_1x2_n"); |
|
1047 extern const uint8_t u8x8_font_7x14_1x2_f[] U8X8_FONT_SECTION("u8x8_font_7x14_1x2_f"); |
|
1048 extern const uint8_t u8x8_font_7x14_1x2_r[] U8X8_FONT_SECTION("u8x8_font_7x14_1x2_r"); |
|
1049 extern const uint8_t u8x8_font_7x14_1x2_n[] U8X8_FONT_SECTION("u8x8_font_7x14_1x2_n"); |
|
1050 extern const uint8_t u8x8_font_7x14B_1x2_f[] U8X8_FONT_SECTION("u8x8_font_7x14B_1x2_f"); |
|
1051 extern const uint8_t u8x8_font_7x14B_1x2_r[] U8X8_FONT_SECTION("u8x8_font_7x14B_1x2_r"); |
|
1052 extern const uint8_t u8x8_font_7x14B_1x2_n[] U8X8_FONT_SECTION("u8x8_font_7x14B_1x2_n"); |
|
1053 extern const uint8_t u8x8_font_open_iconic_arrow_1x1[] U8X8_FONT_SECTION("u8x8_font_open_iconic_arrow_1x1"); |
|
1054 extern const uint8_t u8x8_font_open_iconic_check_1x1[] U8X8_FONT_SECTION("u8x8_font_open_iconic_check_1x1"); |
|
1055 extern const uint8_t u8x8_font_open_iconic_embedded_1x1[] U8X8_FONT_SECTION("u8x8_font_open_iconic_embedded_1x1"); |
|
1056 extern const uint8_t u8x8_font_open_iconic_play_1x1[] U8X8_FONT_SECTION("u8x8_font_open_iconic_play_1x1"); |
|
1057 extern const uint8_t u8x8_font_open_iconic_thing_1x1[] U8X8_FONT_SECTION("u8x8_font_open_iconic_thing_1x1"); |
|
1058 extern const uint8_t u8x8_font_open_iconic_weather_1x1[] U8X8_FONT_SECTION("u8x8_font_open_iconic_weather_1x1"); |
|
1059 extern const uint8_t u8x8_font_open_iconic_arrow_2x2[] U8X8_FONT_SECTION("u8x8_font_open_iconic_arrow_2x2"); |
|
1060 extern const uint8_t u8x8_font_open_iconic_check_2x2[] U8X8_FONT_SECTION("u8x8_font_open_iconic_check_2x2"); |
|
1061 extern const uint8_t u8x8_font_open_iconic_embedded_2x2[] U8X8_FONT_SECTION("u8x8_font_open_iconic_embedded_2x2"); |
|
1062 extern const uint8_t u8x8_font_open_iconic_play_2x2[] U8X8_FONT_SECTION("u8x8_font_open_iconic_play_2x2"); |
|
1063 extern const uint8_t u8x8_font_open_iconic_thing_2x2[] U8X8_FONT_SECTION("u8x8_font_open_iconic_thing_2x2"); |
|
1064 extern const uint8_t u8x8_font_open_iconic_weather_2x2[] U8X8_FONT_SECTION("u8x8_font_open_iconic_weather_2x2"); |
|
1065 extern const uint8_t u8x8_font_open_iconic_arrow_4x4[] U8X8_FONT_SECTION("u8x8_font_open_iconic_arrow_4x4"); |
|
1066 extern const uint8_t u8x8_font_open_iconic_check_4x4[] U8X8_FONT_SECTION("u8x8_font_open_iconic_check_4x4"); |
|
1067 extern const uint8_t u8x8_font_open_iconic_embedded_4x4[] U8X8_FONT_SECTION("u8x8_font_open_iconic_embedded_4x4"); |
|
1068 extern const uint8_t u8x8_font_open_iconic_play_4x4[] U8X8_FONT_SECTION("u8x8_font_open_iconic_play_4x4"); |
|
1069 extern const uint8_t u8x8_font_open_iconic_thing_4x4[] U8X8_FONT_SECTION("u8x8_font_open_iconic_thing_4x4"); |
|
1070 extern const uint8_t u8x8_font_open_iconic_weather_4x4[] U8X8_FONT_SECTION("u8x8_font_open_iconic_weather_4x4"); |
|
1071 extern const uint8_t u8x8_font_open_iconic_arrow_8x8[] U8X8_FONT_SECTION("u8x8_font_open_iconic_arrow_8x8"); |
|
1072 extern const uint8_t u8x8_font_open_iconic_check_8x8[] U8X8_FONT_SECTION("u8x8_font_open_iconic_check_8x8"); |
|
1073 extern const uint8_t u8x8_font_open_iconic_embedded_8x8[] U8X8_FONT_SECTION("u8x8_font_open_iconic_embedded_8x8"); |
|
1074 extern const uint8_t u8x8_font_open_iconic_play_8x8[] U8X8_FONT_SECTION("u8x8_font_open_iconic_play_8x8"); |
|
1075 extern const uint8_t u8x8_font_open_iconic_thing_8x8[] U8X8_FONT_SECTION("u8x8_font_open_iconic_thing_8x8"); |
|
1076 extern const uint8_t u8x8_font_open_iconic_weather_8x8[] U8X8_FONT_SECTION("u8x8_font_open_iconic_weather_8x8"); |
|
1077 extern const uint8_t u8x8_font_profont29_2x3_f[] U8X8_FONT_SECTION("u8x8_font_profont29_2x3_f"); |
|
1078 extern const uint8_t u8x8_font_profont29_2x3_r[] U8X8_FONT_SECTION("u8x8_font_profont29_2x3_r"); |
|
1079 extern const uint8_t u8x8_font_profont29_2x3_n[] U8X8_FONT_SECTION("u8x8_font_profont29_2x3_n"); |
|
1080 extern const uint8_t u8x8_font_artossans8_r[] U8X8_FONT_SECTION("u8x8_font_artossans8_r"); |
|
1081 extern const uint8_t u8x8_font_artossans8_n[] U8X8_FONT_SECTION("u8x8_font_artossans8_n"); |
|
1082 extern const uint8_t u8x8_font_artossans8_u[] U8X8_FONT_SECTION("u8x8_font_artossans8_u"); |
|
1083 extern const uint8_t u8x8_font_artosserif8_r[] U8X8_FONT_SECTION("u8x8_font_artosserif8_r"); |
|
1084 extern const uint8_t u8x8_font_artosserif8_n[] U8X8_FONT_SECTION("u8x8_font_artosserif8_n"); |
|
1085 extern const uint8_t u8x8_font_artosserif8_u[] U8X8_FONT_SECTION("u8x8_font_artosserif8_u"); |
|
1086 extern const uint8_t u8x8_font_chroma48medium8_r[] U8X8_FONT_SECTION("u8x8_font_chroma48medium8_r"); |
|
1087 extern const uint8_t u8x8_font_chroma48medium8_n[] U8X8_FONT_SECTION("u8x8_font_chroma48medium8_n"); |
|
1088 extern const uint8_t u8x8_font_chroma48medium8_u[] U8X8_FONT_SECTION("u8x8_font_chroma48medium8_u"); |
|
1089 extern const uint8_t u8x8_font_saikyosansbold8_n[] U8X8_FONT_SECTION("u8x8_font_saikyosansbold8_n"); |
|
1090 extern const uint8_t u8x8_font_saikyosansbold8_u[] U8X8_FONT_SECTION("u8x8_font_saikyosansbold8_u"); |
|
1091 extern const uint8_t u8x8_font_torussansbold8_r[] U8X8_FONT_SECTION("u8x8_font_torussansbold8_r"); |
|
1092 extern const uint8_t u8x8_font_torussansbold8_n[] U8X8_FONT_SECTION("u8x8_font_torussansbold8_n"); |
|
1093 extern const uint8_t u8x8_font_torussansbold8_u[] U8X8_FONT_SECTION("u8x8_font_torussansbold8_u"); |
|
1094 extern const uint8_t u8x8_font_victoriabold8_r[] U8X8_FONT_SECTION("u8x8_font_victoriabold8_r"); |
|
1095 extern const uint8_t u8x8_font_victoriabold8_n[] U8X8_FONT_SECTION("u8x8_font_victoriabold8_n"); |
|
1096 extern const uint8_t u8x8_font_victoriabold8_u[] U8X8_FONT_SECTION("u8x8_font_victoriabold8_u"); |
|
1097 extern const uint8_t u8x8_font_victoriamedium8_r[] U8X8_FONT_SECTION("u8x8_font_victoriamedium8_r"); |
|
1098 extern const uint8_t u8x8_font_victoriamedium8_n[] U8X8_FONT_SECTION("u8x8_font_victoriamedium8_n"); |
|
1099 extern const uint8_t u8x8_font_victoriamedium8_u[] U8X8_FONT_SECTION("u8x8_font_victoriamedium8_u"); |
|
1100 extern const uint8_t u8x8_font_courB18_2x3_f[] U8X8_FONT_SECTION("u8x8_font_courB18_2x3_f"); |
|
1101 extern const uint8_t u8x8_font_courB18_2x3_r[] U8X8_FONT_SECTION("u8x8_font_courB18_2x3_r"); |
|
1102 extern const uint8_t u8x8_font_courB18_2x3_n[] U8X8_FONT_SECTION("u8x8_font_courB18_2x3_n"); |
|
1103 extern const uint8_t u8x8_font_courR18_2x3_f[] U8X8_FONT_SECTION("u8x8_font_courR18_2x3_f"); |
|
1104 extern const uint8_t u8x8_font_courR18_2x3_r[] U8X8_FONT_SECTION("u8x8_font_courR18_2x3_r"); |
|
1105 extern const uint8_t u8x8_font_courR18_2x3_n[] U8X8_FONT_SECTION("u8x8_font_courR18_2x3_n"); |
|
1106 extern const uint8_t u8x8_font_courB24_3x4_f[] U8X8_FONT_SECTION("u8x8_font_courB24_3x4_f"); |
|
1107 extern const uint8_t u8x8_font_courB24_3x4_r[] U8X8_FONT_SECTION("u8x8_font_courB24_3x4_r"); |
|
1108 extern const uint8_t u8x8_font_courB24_3x4_n[] U8X8_FONT_SECTION("u8x8_font_courB24_3x4_n"); |
|
1109 extern const uint8_t u8x8_font_courR24_3x4_f[] U8X8_FONT_SECTION("u8x8_font_courR24_3x4_f"); |
|
1110 extern const uint8_t u8x8_font_courR24_3x4_r[] U8X8_FONT_SECTION("u8x8_font_courR24_3x4_r"); |
|
1111 extern const uint8_t u8x8_font_courR24_3x4_n[] U8X8_FONT_SECTION("u8x8_font_courR24_3x4_n"); |
|
1112 extern const uint8_t u8x8_font_lucasarts_scumm_subtitle_o_2x2_f[] U8X8_FONT_SECTION("u8x8_font_lucasarts_scumm_subtitle_o_2x2_f"); |
|
1113 extern const uint8_t u8x8_font_lucasarts_scumm_subtitle_o_2x2_r[] U8X8_FONT_SECTION("u8x8_font_lucasarts_scumm_subtitle_o_2x2_r"); |
|
1114 extern const uint8_t u8x8_font_lucasarts_scumm_subtitle_o_2x2_n[] U8X8_FONT_SECTION("u8x8_font_lucasarts_scumm_subtitle_o_2x2_n"); |
|
1115 extern const uint8_t u8x8_font_lucasarts_scumm_subtitle_r_2x2_f[] U8X8_FONT_SECTION("u8x8_font_lucasarts_scumm_subtitle_r_2x2_f"); |
|
1116 extern const uint8_t u8x8_font_lucasarts_scumm_subtitle_r_2x2_r[] U8X8_FONT_SECTION("u8x8_font_lucasarts_scumm_subtitle_r_2x2_r"); |
|
1117 extern const uint8_t u8x8_font_lucasarts_scumm_subtitle_r_2x2_n[] U8X8_FONT_SECTION("u8x8_font_lucasarts_scumm_subtitle_r_2x2_n"); |
|
1118 extern const uint8_t u8x8_font_inr21_2x4_f[] U8X8_FONT_SECTION("u8x8_font_inr21_2x4_f"); |
|
1119 extern const uint8_t u8x8_font_inr21_2x4_r[] U8X8_FONT_SECTION("u8x8_font_inr21_2x4_r"); |
|
1120 extern const uint8_t u8x8_font_inr21_2x4_n[] U8X8_FONT_SECTION("u8x8_font_inr21_2x4_n"); |
|
1121 extern const uint8_t u8x8_font_inr33_3x6_f[] U8X8_FONT_SECTION("u8x8_font_inr33_3x6_f"); |
|
1122 extern const uint8_t u8x8_font_inr33_3x6_r[] U8X8_FONT_SECTION("u8x8_font_inr33_3x6_r"); |
|
1123 extern const uint8_t u8x8_font_inr33_3x6_n[] U8X8_FONT_SECTION("u8x8_font_inr33_3x6_n"); |
|
1124 extern const uint8_t u8x8_font_inr46_4x8_f[] U8X8_FONT_SECTION("u8x8_font_inr46_4x8_f"); |
|
1125 extern const uint8_t u8x8_font_inr46_4x8_r[] U8X8_FONT_SECTION("u8x8_font_inr46_4x8_r"); |
|
1126 extern const uint8_t u8x8_font_inr46_4x8_n[] U8X8_FONT_SECTION("u8x8_font_inr46_4x8_n"); |
|
1127 extern const uint8_t u8x8_font_inb21_2x4_f[] U8X8_FONT_SECTION("u8x8_font_inb21_2x4_f"); |
|
1128 extern const uint8_t u8x8_font_inb21_2x4_r[] U8X8_FONT_SECTION("u8x8_font_inb21_2x4_r"); |
|
1129 extern const uint8_t u8x8_font_inb21_2x4_n[] U8X8_FONT_SECTION("u8x8_font_inb21_2x4_n"); |
|
1130 extern const uint8_t u8x8_font_inb33_3x6_f[] U8X8_FONT_SECTION("u8x8_font_inb33_3x6_f"); |
|
1131 extern const uint8_t u8x8_font_inb33_3x6_r[] U8X8_FONT_SECTION("u8x8_font_inb33_3x6_r"); |
|
1132 extern const uint8_t u8x8_font_inb33_3x6_n[] U8X8_FONT_SECTION("u8x8_font_inb33_3x6_n"); |
|
1133 extern const uint8_t u8x8_font_inb46_4x8_f[] U8X8_FONT_SECTION("u8x8_font_inb46_4x8_f"); |
|
1134 extern const uint8_t u8x8_font_inb46_4x8_r[] U8X8_FONT_SECTION("u8x8_font_inb46_4x8_r"); |
|
1135 extern const uint8_t u8x8_font_inb46_4x8_n[] U8X8_FONT_SECTION("u8x8_font_inb46_4x8_n"); |
|
1136 extern const uint8_t u8x8_font_pressstart2p_f[] U8X8_FONT_SECTION("u8x8_font_pressstart2p_f"); |
|
1137 extern const uint8_t u8x8_font_pressstart2p_r[] U8X8_FONT_SECTION("u8x8_font_pressstart2p_r"); |
|
1138 extern const uint8_t u8x8_font_pressstart2p_n[] U8X8_FONT_SECTION("u8x8_font_pressstart2p_n"); |
|
1139 extern const uint8_t u8x8_font_pressstart2p_u[] U8X8_FONT_SECTION("u8x8_font_pressstart2p_u"); |
|
1140 extern const uint8_t u8x8_font_pcsenior_f[] U8X8_FONT_SECTION("u8x8_font_pcsenior_f"); |
|
1141 extern const uint8_t u8x8_font_pcsenior_r[] U8X8_FONT_SECTION("u8x8_font_pcsenior_r"); |
|
1142 extern const uint8_t u8x8_font_pcsenior_n[] U8X8_FONT_SECTION("u8x8_font_pcsenior_n"); |
|
1143 extern const uint8_t u8x8_font_pcsenior_u[] U8X8_FONT_SECTION("u8x8_font_pcsenior_u"); |
|
1144 extern const uint8_t u8x8_font_pxplusibmcgathin_f[] U8X8_FONT_SECTION("u8x8_font_pxplusibmcgathin_f"); |
|
1145 extern const uint8_t u8x8_font_pxplusibmcgathin_r[] U8X8_FONT_SECTION("u8x8_font_pxplusibmcgathin_r"); |
|
1146 extern const uint8_t u8x8_font_pxplusibmcgathin_n[] U8X8_FONT_SECTION("u8x8_font_pxplusibmcgathin_n"); |
|
1147 extern const uint8_t u8x8_font_pxplusibmcgathin_u[] U8X8_FONT_SECTION("u8x8_font_pxplusibmcgathin_u"); |
|
1148 extern const uint8_t u8x8_font_pxplusibmcga_f[] U8X8_FONT_SECTION("u8x8_font_pxplusibmcga_f"); |
|
1149 extern const uint8_t u8x8_font_pxplusibmcga_r[] U8X8_FONT_SECTION("u8x8_font_pxplusibmcga_r"); |
|
1150 extern const uint8_t u8x8_font_pxplusibmcga_n[] U8X8_FONT_SECTION("u8x8_font_pxplusibmcga_n"); |
|
1151 extern const uint8_t u8x8_font_pxplusibmcga_u[] U8X8_FONT_SECTION("u8x8_font_pxplusibmcga_u"); |
|
1152 extern const uint8_t u8x8_font_pxplustandynewtv_f[] U8X8_FONT_SECTION("u8x8_font_pxplustandynewtv_f"); |
|
1153 extern const uint8_t u8x8_font_pxplustandynewtv_r[] U8X8_FONT_SECTION("u8x8_font_pxplustandynewtv_r"); |
|
1154 extern const uint8_t u8x8_font_pxplustandynewtv_n[] U8X8_FONT_SECTION("u8x8_font_pxplustandynewtv_n"); |
|
1155 extern const uint8_t u8x8_font_pxplustandynewtv_u[] U8X8_FONT_SECTION("u8x8_font_pxplustandynewtv_u"); |
|
1156 extern const uint8_t u8x8_font_px437wyse700a_2x2_f[] U8X8_FONT_SECTION("u8x8_font_px437wyse700a_2x2_f"); |
|
1157 extern const uint8_t u8x8_font_px437wyse700a_2x2_r[] U8X8_FONT_SECTION("u8x8_font_px437wyse700a_2x2_r"); |
|
1158 extern const uint8_t u8x8_font_px437wyse700a_2x2_n[] U8X8_FONT_SECTION("u8x8_font_px437wyse700a_2x2_n"); |
|
1159 extern const uint8_t u8x8_font_px437wyse700b_2x2_f[] U8X8_FONT_SECTION("u8x8_font_px437wyse700b_2x2_f"); |
|
1160 extern const uint8_t u8x8_font_px437wyse700b_2x2_r[] U8X8_FONT_SECTION("u8x8_font_px437wyse700b_2x2_r"); |
|
1161 extern const uint8_t u8x8_font_px437wyse700b_2x2_n[] U8X8_FONT_SECTION("u8x8_font_px437wyse700b_2x2_n"); |
|
1162 |
|
1163 /* end font list */ |
|
1164 |
|
1165 |
|
1166 #ifdef __cplusplus |
|
1167 } |
|
1168 #endif |
|
1169 |
|
1170 |
|
1171 #endif /* _U8X8_H */ |
|
1172 |