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