Commit 5a29bab4 authored by devsaurus's avatar devsaurus
Browse files

Merge pull request #655 from devsaurus/dev-ucglib

Add bindings for ucglib
parents cb0f32d6 a6c9ba80
...@@ -470,6 +470,61 @@ In contrast to the source code based inclusion of XBMs into u8glib, it's require ...@@ -470,6 +470,61 @@ In contrast to the source code based inclusion of XBMs into u8glib, it's require
- [ ] setRGB() - [ ] setRGB()
- [ ] setDefaultMidColor() - [ ] setDefaultMidColor()
####Operate a display with ucglib
Ucglib is a graphics library with support for color TFT displays.
Ucglib v1.3.3
#####SPI connection
The HSPI module is used, so certain pins are fixed:
* HSPI CLK = GPIO14
* HSPI MOSI = GPIO13
* HSPI MISO = GPIO12 (not used)
All other pins can be assigned to any available GPIO:
* CS
* D/C
* RES (optional for some displays)
Also refer to the initialization sequence eg in [GraphicsTest.lua](lua_examples/ucglib/GraphicsRest.lua):
```lua
spi.setup(1, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, spi.DATABITS_8, 0)
```
#####Library usage
The Lua bindings for this library closely follow ucglib's object oriented C++ API. Based on the ucg class, you create an object for your display type.
ILI9341 via SPI:
```lua
cs = 8 -- GPIO15, pull-down 10k to GND
dc = 4 -- GPIO2
res = 0 -- GPIO16, RES is optional YMMV
disp = ucg.ili9341_18x240x320_hw_spi(cs, dc, res)
```
This object provides all of ucglib's methods to control the display.
Again, refer to [GraphicsTest.lua](lua_examples/ucglib/GraphicsTest.lua) to get an impression how this is achieved with Lua code. Visit the [ucglib homepage](https://github.com/olikraus/ucglib) for technical details.
#####Displays
To get access to the display constructors, add the desired entries to the display table in [app/include/ucg_config.h](app/include/ucg_config.h):
```c
#define UCG_DISPLAY_TABLE \
UCG_DISPLAY_TABLE_ENTRY(ili9341_18x240x320_hw_spi, ucg_dev_ili9341_18x240x320, ucg_ext_ili9341_18) \
UCG_DISPLAY_TABLE_ENTRY(st7735_18x128x160_hw_spi, ucg_dev_st7735_18x128x160, ucg_ext_st7735_18) \
```
#####Fonts
ucglib comes with a wide range of fonts for small displays. Since they need to be compiled into the firmware image, you'd need to include them in [app/include/ucg_config.h](app/include/ucg_config.h) and recompile. Simply add the desired fonts to the font table:
```c
#define UCG_FONT_TABLE \
UCG_FONT_TABLE_ENTRY(font_7x13B_tr) \
UCG_FONT_TABLE_ENTRY(font_helvB12_hr) \
UCG_FONT_TABLE_ENTRY(font_helvB18_hr) \
UCG_FONT_TABLE_ENTRY(font_ncenR12_tr) \
UCG_FONT_TABLE_ENTRY(font_ncenR14_hr)
```
They'll be available as `ucg.<font_name>` in Lua.
####Control a WS2812 based light strip ####Control a WS2812 based light strip
```lua ```lua
......
...@@ -33,6 +33,7 @@ SUBDIRS= \ ...@@ -33,6 +33,7 @@ SUBDIRS= \
coap \ coap \
mqtt \ mqtt \
u8glib \ u8glib \
ucglib \
smart \ smart \
wofs \ wofs \
modules \ modules \
...@@ -85,6 +86,7 @@ COMPONENTS_eagle.app.v6 = \ ...@@ -85,6 +86,7 @@ COMPONENTS_eagle.app.v6 = \
coap/coap.a \ coap/coap.a \
mqtt/mqtt.a \ mqtt/mqtt.a \
u8glib/u8glib.a \ u8glib/u8glib.a \
ucglib/ucglib.a \
smart/smart.a \ smart/smart.a \
wofs/wofs.a \ wofs/wofs.a \
spiffs/spiffs.a \ spiffs/spiffs.a \
......
#ifndef __UCG_CONFIG_H__
#define __UCG_CONFIG_H__
// ***************************************************************************
// Configure Ucglib fonts
//
// Add a UCG_FONT_TABLE_ENTRY for each font you want to compile into the image
#define UCG_FONT_TABLE_ENTRY(font)
#define UCG_FONT_TABLE \
UCG_FONT_TABLE_ENTRY(font_7x13B_tr) \
UCG_FONT_TABLE_ENTRY(font_helvB08_hr) \
UCG_FONT_TABLE_ENTRY(font_helvB10_hr) \
UCG_FONT_TABLE_ENTRY(font_helvB12_hr) \
UCG_FONT_TABLE_ENTRY(font_helvB18_hr) \
UCG_FONT_TABLE_ENTRY(font_ncenB24_tr) \
UCG_FONT_TABLE_ENTRY(font_ncenR12_tr) \
UCG_FONT_TABLE_ENTRY(font_ncenR14_hr)
#undef UCG_FONT_TABLE_ENTRY
//
// ***************************************************************************
// ***************************************************************************
// Enable display drivers
//
// Uncomment the UCG_DISPLAY_TABLE_ENTRY for the device(s) you want to
// compile into the firmware.
//
// UCG_DISPLAY_TABLE_ENTRY(ili9163_18x128x128_hw_spi, ucg_dev_ili9163_18x128x128, ucg_ext_ili9163_18) \
// UCG_DISPLAY_TABLE_ENTRY(ili9341_18x240x320_hw_spi, ucg_dev_ili9341_18x240x320, ucg_ext_ili9341_18) \
// UCG_DISPLAY_TABLE_ENTRY(pcf8833_16x132x132_hw_spi, ucg_dev_pcf8833_16x132x132, ucg_ext_pcf8833_16) \
// UCG_DISPLAY_TABLE_ENTRY(seps225_16x128x128_univision_hw_spi, ucg_dev_seps225_16x128x128_univision, ucg_ext_seps225_16) \
// UCG_DISPLAY_TABLE_ENTRY(ssd1351_18x128x128_hw_spi, ucg_dev_ssd1351_18x128x128_ilsoft, ucg_ext_ssd1351_18) \
// UCG_DISPLAY_TABLE_ENTRY(ssd1351_18x128x128_ft_hw_spi, ucg_dev_ssd1351_18x128x128_ft, ucg_ext_ssd1351_18) \
// UCG_DISPLAY_TABLE_ENTRY(ssd1331_18x96x64_univision_hw_spi, ucg_dev_ssd1331_18x96x64_univision, ucg_ext_ssd1331_18) \
// UCG_DISPLAY_TABLE_ENTRY(st7735_18x128x160_hw_spi, ucg_dev_st7735_18x128x160, ucg_ext_st7735_18) \
#define UCG_DISPLAY_TABLE_ENTRY(binding, device, extension)
#define UCG_DISPLAY_TABLE \
UCG_DISPLAY_TABLE_ENTRY(ili9341_18x240x320_hw_spi, ucg_dev_ili9341_18x240x320, ucg_ext_ili9341_18) \
UCG_DISPLAY_TABLE_ENTRY(st7735_18x128x160_hw_spi, ucg_dev_st7735_18x128x160, ucg_ext_st7735_18) \
#undef UCG_DISPLAY_TABLE_ENTRY
//
// ***************************************************************************
#endif /* __UCG_CONFIG_H__ */
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#define LUA_USE_MODULES_MQTT #define LUA_USE_MODULES_MQTT
#define LUA_USE_MODULES_COAP #define LUA_USE_MODULES_COAP
#define LUA_USE_MODULES_U8G #define LUA_USE_MODULES_U8G
//#define LUA_USE_MODULES_UCG
// #define LUA_USE_MODULES_WS2801 // #define LUA_USE_MODULES_WS2801
#define LUA_USE_MODULES_WS2812 #define LUA_USE_MODULES_WS2812
#define LUA_USE_MODULES_CJSON #define LUA_USE_MODULES_CJSON
......
...@@ -42,6 +42,7 @@ INCLUDES += -I ../libc ...@@ -42,6 +42,7 @@ INCLUDES += -I ../libc
INCLUDES += -I ../coap INCLUDES += -I ../coap
INCLUDES += -I ../mqtt INCLUDES += -I ../mqtt
INCLUDES += -I ../u8glib INCLUDES += -I ../u8glib
INCLUDES += -I ../ucglib
INCLUDES += -I ../lua INCLUDES += -I ../lua
INCLUDES += -I ../platform INCLUDES += -I ../platform
INCLUDES += -I ../wofs INCLUDES += -I ../wofs
......
...@@ -70,6 +70,9 @@ LUALIB_API int ( luaopen_mqtt )( lua_State *L ); ...@@ -70,6 +70,9 @@ LUALIB_API int ( luaopen_mqtt )( lua_State *L );
#define AUXLIB_U8G "u8g" #define AUXLIB_U8G "u8g"
LUALIB_API int ( luaopen_u8g )( lua_State *L ); LUALIB_API int ( luaopen_u8g )( lua_State *L );
#define AUXLIB_UCG "ucg"
LUALIB_API int ( luaopen_ucg )( lua_State *L );
#define AUXLIB_NODE "node" #define AUXLIB_NODE "node"
LUALIB_API int ( luaopen_node )( lua_State *L ); LUALIB_API int ( luaopen_node )( lua_State *L );
......
...@@ -61,6 +61,14 @@ ...@@ -61,6 +61,14 @@
#define ROM_MODULES_U8G #define ROM_MODULES_U8G
#endif #endif
#if defined(LUA_USE_MODULES_UCG)
#define MODULES_UCG "ucg"
#define ROM_MODULES_UCG \
_ROM(MODULES_UCG, luaopen_ucg, lucg_map)
#else
#define ROM_MODULES_UCG
#endif
#if defined(LUA_USE_MODULES_I2C) #if defined(LUA_USE_MODULES_I2C)
#define MODULES_I2C "i2c" #define MODULES_I2C "i2c"
#define ROM_MODULES_I2C \ #define ROM_MODULES_I2C \
...@@ -236,6 +244,7 @@ ...@@ -236,6 +244,7 @@
ROM_MODULES_COAP \ ROM_MODULES_COAP \
ROM_MODULES_MQTT \ ROM_MODULES_MQTT \
ROM_MODULES_U8G \ ROM_MODULES_U8G \
ROM_MODULES_UCG \
ROM_MODULES_I2C \ ROM_MODULES_I2C \
ROM_MODULES_SPI \ ROM_MODULES_SPI \
ROM_MODULES_TMR \ ROM_MODULES_TMR \
......
// Module for Ucglib
#include "lualib.h"
#include "lauxlib.h"
#include "platform.h"
#include "auxmods.h"
#include "lrotable.h"
#include "c_stdlib.h"
#include "ucg.h"
#include "ucg_config.h"
struct _lucg_userdata_t
{
ucg_t ucg;
ucg_dev_fnptr dev_cb;
ucg_dev_fnptr ext_cb;
// For Print() function
ucg_int_t tx, ty;
uint8_t tdir;
};
typedef struct _lucg_userdata_t lucg_userdata_t;
#define delayMicroseconds os_delay_us
static int16_t ucg_com_esp8266_hw_spi(ucg_t *ucg, int16_t msg, uint16_t arg, uint8_t *data);
// shorthand macro for the ucg structure inside the userdata
#define LUCG (&(lud->ucg))
// helper function: retrieve and check userdata argument
static lucg_userdata_t *get_lud( lua_State *L )
{
lucg_userdata_t *lud = (lucg_userdata_t *)luaL_checkudata(L, 1, "ucg.display");
luaL_argcheck(L, lud, 1, "ucg.display expected");
return lud;
}
// helper function: retrieve given number of integer arguments
static void lucg_get_int_args( lua_State *L, uint8_t stack, uint8_t num, ucg_int_t *args)
{
while (num-- > 0)
{
*args++ = luaL_checkinteger( L, stack++ );
}
}
// Lua: ucg.begin( self, fontmode )
static int lucg_begin( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_Init( LUCG, lud->dev_cb, lud->ext_cb, ucg_com_esp8266_hw_spi );
ucg_int_t fontmode = luaL_checkinteger( L, 2 );
ucg_SetFontMode( LUCG, fontmode );
return 0;
}
// Lua: ucg.clearScreen( self )
static int lucg_clearScreen( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_ClearScreen( LUCG );
return 0;
}
// Lua: ucg.draw90Line( self, x, y, len, dir, col_idx )
static int lucg_draw90Line( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[5];
lucg_get_int_args( L, 2, 5, args );
ucg_Draw90Line( LUCG, args[0], args[1], args[2], args[3], args[4] );
return 0;
}
// Lua: ucg.drawBox( self, x, y, w, h )
static int lucg_drawBox( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[4];
lucg_get_int_args( L, 2, 4, args );
ucg_DrawBox( LUCG, args[0], args[1], args[2], args[3] );
return 0;
}
// Lua: ucg.drawCircle( self, x0, y0, rad, option )
static int lucg_drawCircle( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[4];
lucg_get_int_args( L, 2, 4, args );
ucg_DrawCircle( LUCG, args[0], args[1], args[2], args[3] );
return 0;
}
// Lua: ucg.drawDisc( self, x0, y0, rad, option )
static int lucg_drawDisc( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[4];
lucg_get_int_args( L, 2, 4, args );
ucg_DrawDisc( LUCG, args[0], args[1], args[2], args[3] );
return 0;
}
// Lua: ucg.drawFrame( self, x, y, w, h )
static int lucg_drawFrame( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[4];
lucg_get_int_args( L, 2, 4, args );
ucg_DrawFrame( LUCG, args[0], args[1], args[2], args[3] );
return 0;
}
// Lua: ucg.drawGradientBox( self, x, y, w, h )
static int lucg_drawGradientBox( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[4];
lucg_get_int_args( L, 2, 4, args );
ucg_DrawGradientBox( LUCG, args[0], args[1], args[2], args[3] );
return 0;
}
// Lua: width = ucg.drawGlyph( self, x, y, dir, encoding )
static int lucg_drawGlyph( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[3];
lucg_get_int_args( L, 2, 3, args );
const char *c = luaL_checkstring( L, (1+3) + 1 );
if (c == NULL)
return 0;
lua_pushinteger( L, ucg_DrawGlyph( LUCG, args[0], args[1], args[2], *c ) );
return 1;
}
// Lua: ucg.drawGradientLine( self, x, y, len, dir )
static int lucg_drawGradientLine( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[4];
lucg_get_int_args( L, 2, 4, args );
ucg_DrawGradientLine( LUCG, args[0], args[1], args[2], args[3] );
return 0;
}
// Lua: ucg.drawHLine( self, x, y, len )
static int lucg_drawHLine( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[3];
lucg_get_int_args( L, 2, 3, args );
ucg_DrawHLine( LUCG, args[0], args[1], args[2] );
return 0;
}
// Lua: ucg.drawLine( self, x1, y1, x2, y2 )
static int lucg_drawLine( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[4];
lucg_get_int_args( L, 2, 4, args );
ucg_DrawLine( LUCG, args[0], args[1], args[2], args[3] );
return 0;
}
// Lua: ucg.drawPixel( self, x, y )
static int lucg_drawPixel( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[2];
lucg_get_int_args( L, 2, 2, args );
ucg_DrawPixel( LUCG, args[0], args[1] );
return 0;
}
// Lua: ucg.drawRBox( self, x, y, w, h, r )
static int lucg_drawRBox( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[5];
lucg_get_int_args( L, 2, 5, args );
ucg_DrawRBox( LUCG, args[0], args[1], args[2], args[3], args[4] );
return 0;
}
// Lua: ucg.drawRFrame( self, x, y, w, h, r )
static int lucg_drawRFrame( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[5];
lucg_get_int_args( L, 2, 5, args );
ucg_DrawRFrame( LUCG, args[0], args[1], args[2], args[3], args[4] );
return 0;
}
// Lua: width = ucg.drawString( self, x, y, dir, str )
static int lucg_drawString( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[3];
lucg_get_int_args( L, 2, 3, args );
const char *s = luaL_checkstring( L, (1+3) + 1 );
if (s == NULL)
return 0;
lua_pushinteger( L, ucg_DrawString( LUCG, args[0], args[1], args[2], s ) );
return 1;
}
// Lua: ucg.drawTetragon( self, x0, y0, x1, y1, x2, y2, x3, y3 )
static int lucg_drawTetragon( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[8];
lucg_get_int_args( L, 2, 8, args );
ucg_DrawTetragon( LUCG, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7] );
return 0;
}
// Lua: ucg.drawTriangle( self, x0, y0, x1, y1, x2, y2 )
static int lucg_drawTriangle( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[6];
lucg_get_int_args( L, 2, 6, args );
ucg_DrawTriangle( LUCG, args[0], args[1], args[2], args[3], args[4], args[5] );
return 0;
}
// Lua: ucg.drawVLine( self, x, y, len )
static int lucg_drawVLine( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[3];
lucg_get_int_args( L, 2, 3, args );
ucg_DrawVLine( LUCG, args[0], args[1], args[2] );
return 0;
}
// Lua: height = ucg.getFontAscent( self )
static int lucg_getFontAscent( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
lua_pushinteger( L, ucg_GetFontAscent( LUCG ) );
return 1;
}
// Lua: height = ucg.getFontDescent( self )
static int lucg_getFontDescent( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
lua_pushinteger( L, ucg_GetFontDescent( LUCG ) );
return 1;
}
// Lua: height = ucg.getHeight( self )
static int lucg_getHeight( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
lua_pushinteger( L, ucg_GetHeight( LUCG ) );
return 1;
}
// Lua: width = ucg.getStrWidth( self )
static int lucg_getStrWidth( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
const char *s = luaL_checkstring( L, (1+3) + 1 );
if (s == NULL)
return 0;
lua_pushinteger( L, ucg_GetStrWidth( LUCG, s ) );
return 1;
}
// Lua: width = ucg.getWidth( self )
static int lucg_getWidth( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
lua_pushinteger( L, ucg_GetWidth( LUCG ) );
return 1;
}
// Lua: ucg.setClipRange( self, x, y, w, h )
static int lucg_setClipRange( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[4];
lucg_get_int_args( L, 2, 4, args );
ucg_SetClipRange( LUCG, args[0], args[1], args[2], args[3] );
return 0;
}
// Lua: ucg.setColor( self, [idx], r, g, b )
static int lucg_setColor( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[3];
lucg_get_int_args( L, 2, 3, args );
ucg_int_t opt = luaL_optint( L, (1+3) + 1, -1 );
if (opt < 0)
ucg_SetColor( LUCG, 0, args[0], args[1], args[2] );
else
ucg_SetColor( LUCG, args[0], args[1], args[2], opt );
return 0;
}
// Lua: ucg.setFont( self, font )
static int lucg_setFont( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_fntpgm_uint8_t *font = (ucg_fntpgm_uint8_t *)lua_touserdata( L, 2 );
if (font != NULL)
ucg_SetFont( LUCG, font );
else
luaL_argerror(L, 2, "font data expected");
return 0;
}
// Lua: ucg.print( self, str )
static int lucg_print( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
const char *s = luaL_checkstring( L, 2 );
if (s == NULL)
return 0;
while (*s)
{
ucg_int_t delta;
delta = ucg_DrawGlyph(LUCG, lud->tx, lud->ty, lud->tdir, *(s++));
switch(lud->tdir)
{
case 0: lud->tx += delta; break;
case 1: lud->ty += delta; break;
case 2: lud->tx -= delta; break;
default: case 3: lud->ty -= delta; break;
}
}
return 0;
}
// Lua: ucg.setFontMode( self, fontmode )
static int lucg_setFontMode( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t fontmode = luaL_checkinteger( L, 2 );
ucg_SetFontMode( LUCG, fontmode );
return 0;
}
// Lua: ucg.setFontPosBaseline( self )
static int lucg_setFontPosBaseline( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_SetFontPosBaseline( LUCG );
return 0;
}
// Lua: ucg.setFontPosBottom( self )
static int lucg_setFontPosBottom( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_SetFontPosBottom( LUCG );
return 0;
}
// Lua: ucg.setFontPosCenter( self )
static int lucg_setFontPosCenter( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_SetFontPosCenter( LUCG );
return 0;
}
// Lua: ucg.setFontPosTop( self )
static int lucg_setFontPosTop( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_SetFontPosTop( LUCG );
return 0;
}
// Lua: ucg.setMaxClipRange( self )
static int lucg_setMaxClipRange( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_SetMaxClipRange( LUCG );
return 0;
}
// Lua: ucg.setPrintPos( self, x, y )
static int lucg_setPrintPos( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_int_t args[2];
lucg_get_int_args( L, 2, 2, args );
lud->tx = args[0];
lud->ty = args[1];
return 0;
}
// Lua: ucg.setPrintDir( self, dir )
static int lucg_setPrintDir( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
lud->tdir = luaL_checkinteger( L, 2 );
return 0;
}
// Lua: ucg.setRotate90( self )
static int lucg_setRotate90( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_SetRotate90( LUCG );
return 0;
}
// Lua: ucg.setRotate180( self )
static int lucg_setRotate180( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_SetRotate180( LUCG );
return 0;
}
// Lua: ucg.setRotate270( self )
static int lucg_setRotate270( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_SetRotate270( LUCG );
return 0;
}
// Lua: ucg.setScale2x2( self )
static int lucg_setScale2x2( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_SetScale2x2( LUCG );
return 0;
}
// Lua: ucg.undoRotate( self )
static int lucg_undoRotate( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_UndoRotate( LUCG );
return 0;
}
// Lua: ucg.undoScale( self )
static int lucg_undoScale( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
ucg_UndoScale( LUCG );
return 0;
}
static int16_t ucg_com_esp8266_hw_spi(ucg_t *ucg, int16_t msg, uint16_t arg, uint8_t *data)
{
switch(msg)
{
case UCG_COM_MSG_POWER_UP:
/* "data" is a pointer to ucg_com_info_t structure with the following information: */
/* ((ucg_com_info_t *)data)->serial_clk_speed value in nanoseconds */
/* ((ucg_com_info_t *)data)->parallel_clk_speed value in nanoseconds */
/* setup pins */
// we assume that the SPI interface was already initialized
// just care for the /CS and D/C pins
//platform_gpio_write( ucg->pin_list[0], value );
if ( ucg->pin_list[UCG_PIN_RST] != UCG_PIN_VAL_NONE )
platform_gpio_mode( ucg->pin_list[UCG_PIN_RST], PLATFORM_GPIO_OUTPUT, PLATFORM_GPIO_FLOAT );
platform_gpio_mode( ucg->pin_list[UCG_PIN_CD], PLATFORM_GPIO_OUTPUT, PLATFORM_GPIO_FLOAT );
if ( ucg->pin_list[UCG_PIN_CS] != UCG_PIN_VAL_NONE )
platform_gpio_mode( ucg->pin_list[UCG_PIN_CS], PLATFORM_GPIO_OUTPUT, PLATFORM_GPIO_FLOAT );
break;
case UCG_COM_MSG_POWER_DOWN:
break;
case UCG_COM_MSG_DELAY:
delayMicroseconds(arg);
break;
case UCG_COM_MSG_CHANGE_RESET_LINE:
if ( ucg->pin_list[UCG_PIN_RST] != UCG_PIN_VAL_NONE )
platform_gpio_write( ucg->pin_list[UCG_PIN_RST], arg );
break;
case UCG_COM_MSG_CHANGE_CS_LINE:
if ( ucg->pin_list[UCG_PIN_CS] != UCG_PIN_VAL_NONE )
platform_gpio_write( ucg->pin_list[UCG_PIN_CS], arg );
break;
case UCG_COM_MSG_CHANGE_CD_LINE:
platform_gpio_write( ucg->pin_list[UCG_PIN_CD], arg );
break;
case UCG_COM_MSG_SEND_BYTE:
platform_spi_send_recv( 1, arg );
break;
case UCG_COM_MSG_REPEAT_1_BYTE:
while( arg > 0 ) {
platform_spi_send_recv( 1, data[0] );
arg--;
}
break;
case UCG_COM_MSG_REPEAT_2_BYTES:
while( arg > 0 ) {
platform_spi_send_recv( 1, data[0] );
platform_spi_send_recv( 1, data[1] );
arg--;
}
break;
case UCG_COM_MSG_REPEAT_3_BYTES:
while( arg > 0 ) {
platform_spi_send_recv( 1, data[0] );
platform_spi_send_recv( 1, data[1] );
platform_spi_send_recv( 1, data[2] );
arg--;
}
break;
case UCG_COM_MSG_SEND_STR:
while( arg > 0 ) {
platform_spi_send_recv( 1, *data++ );
arg--;
}
break;
case UCG_COM_MSG_SEND_CD_DATA_SEQUENCE:
while(arg > 0)
{
if ( *data != 0 )
{
/* set the data line directly, ignore the setting from UCG_CFG_CD */
if ( *data == 1 )
{
platform_gpio_write( ucg->pin_list[UCG_PIN_CD], 0 );
}
else
{
platform_gpio_write( ucg->pin_list[UCG_PIN_CD], 1 );
}
}
data++;
platform_spi_send_recv( 1, *data );
data++;
arg--;
}
break;
}
return 1;
}
// device destructor
static int lucg_close_display( lua_State *L )
{
lucg_userdata_t *lud;
if ((lud = get_lud( L )) == NULL)
return 0;
return 0;
}
// ***************************************************************************
// Device constructors
//
//
#undef UCG_DISPLAY_TABLE_ENTRY
#define UCG_DISPLAY_TABLE_ENTRY(binding, device, extension) \
static int lucg_ ## binding( lua_State *L ) \
{ \
unsigned cs = luaL_checkinteger( L, 1 ); \
if (cs == 0) \
return luaL_error( L, "CS pin required" ); \
unsigned dc = luaL_checkinteger( L, 2 ); \
if (dc == 0) \
return luaL_error( L, "D/C pin required" ); \
unsigned res = luaL_optinteger( L, 3, UCG_PIN_VAL_NONE ); \
\
lucg_userdata_t *lud = (lucg_userdata_t *) lua_newuserdata( L, sizeof( lucg_userdata_t ) ); \
\
/* do a dummy init so that something usefull is part of the ucg structure */ \
ucg_Init( LUCG, ucg_dev_default_cb, ucg_ext_none, (ucg_com_fnptr)0 ); \
\
/* reset cursor position */ \
lud->tx = 0; \
lud->ty = 0; \
lud->tdir = 0; /* default direction */ \
\
uint8_t i; \
for( i = 0; i < UCG_PIN_COUNT; i++ ) \
lud->ucg.pin_list[i] = UCG_PIN_VAL_NONE; \
\
lud->dev_cb = device; \
lud->ext_cb = extension; \
lud->ucg.pin_list[UCG_PIN_RST] = res; \
lud->ucg.pin_list[UCG_PIN_CD] = dc; \
lud->ucg.pin_list[UCG_PIN_CS] = cs; \
\
/* set its metatable */ \
luaL_getmetatable(L, "ucg.display"); \
lua_setmetatable(L, -2); \
\
return 1; \
}
//
// Unroll the display table and insert binding functions.
UCG_DISPLAY_TABLE
//
// ***************************************************************************
// Module function map
#define MIN_OPT_LEVEL 2
#include "lrodefs.h"
static const LUA_REG_TYPE lucg_display_map[] =
{
{ LSTRKEY( "begin" ), LFUNCVAL( lucg_begin ) },
{ LSTRKEY( "clearScreen" ), LFUNCVAL( lucg_clearScreen ) },
{ LSTRKEY( "draw90Line" ), LFUNCVAL( lucg_draw90Line ) },
{ LSTRKEY( "drawBox" ), LFUNCVAL( lucg_drawBox ) },
{ LSTRKEY( "drawCircle" ), LFUNCVAL( lucg_drawCircle ) },
{ LSTRKEY( "drawDisc" ), LFUNCVAL( lucg_drawDisc ) },
{ LSTRKEY( "drawFrame" ), LFUNCVAL( lucg_drawFrame ) },
{ LSTRKEY( "drawGlyph" ), LFUNCVAL( lucg_drawGlyph ) },
{ LSTRKEY( "drawGradientBox" ), LFUNCVAL( lucg_drawGradientBox ) },
{ LSTRKEY( "drawGradientLine" ), LFUNCVAL( lucg_drawGradientLine ) },
{ LSTRKEY( "drawHLine" ), LFUNCVAL( lucg_drawHLine ) },
{ LSTRKEY( "drawLine" ), LFUNCVAL( lucg_drawLine ) },
{ LSTRKEY( "drawPixel" ), LFUNCVAL( lucg_drawPixel ) },
{ LSTRKEY( "drawRBox" ), LFUNCVAL( lucg_drawRBox ) },
{ LSTRKEY( "drawRFrame" ), LFUNCVAL( lucg_drawRFrame ) },
{ LSTRKEY( "drawString" ), LFUNCVAL( lucg_drawString ) },
{ LSTRKEY( "drawTetragon" ), LFUNCVAL( lucg_drawTetragon ) },
{ LSTRKEY( "drawTriangle" ), LFUNCVAL( lucg_drawTriangle ) },
{ LSTRKEY( "drawVLine" ), LFUNCVAL( lucg_drawVLine ) },
{ LSTRKEY( "getFontAscent" ), LFUNCVAL( lucg_getFontAscent ) },
{ LSTRKEY( "getFontDescent" ), LFUNCVAL( lucg_getFontDescent ) },
{ LSTRKEY( "getHeight" ), LFUNCVAL( lucg_getHeight ) },
{ LSTRKEY( "getStrWidth" ), LFUNCVAL( lucg_getStrWidth ) },
{ LSTRKEY( "getWidth" ), LFUNCVAL( lucg_getWidth ) },
{ LSTRKEY( "print" ), LFUNCVAL( lucg_print ) },
{ LSTRKEY( "setClipRange" ), LFUNCVAL( lucg_setClipRange ) },
{ LSTRKEY( "setColor" ), LFUNCVAL( lucg_setColor ) },
{ LSTRKEY( "setFont" ), LFUNCVAL( lucg_setFont ) },
{ LSTRKEY( "setFontMode" ), LFUNCVAL( lucg_setFontMode ) },
{ LSTRKEY( "setFontPosBaseline" ), LFUNCVAL( lucg_setFontPosBaseline ) },
{ LSTRKEY( "setFontPosBottom" ), LFUNCVAL( lucg_setFontPosBottom ) },
{ LSTRKEY( "setFontPosCenter" ), LFUNCVAL( lucg_setFontPosCenter ) },
{ LSTRKEY( "setFontPosTop" ), LFUNCVAL( lucg_setFontPosTop ) },
{ LSTRKEY( "setMaxClipRange" ), LFUNCVAL( lucg_setMaxClipRange ) },
{ LSTRKEY( "setPrintDir" ), LFUNCVAL( lucg_setPrintDir ) },
{ LSTRKEY( "setPrintPos" ), LFUNCVAL( lucg_setPrintPos ) },
{ LSTRKEY( "setRotate90" ), LFUNCVAL( lucg_setRotate90 ) },
{ LSTRKEY( "setRotate180" ), LFUNCVAL( lucg_setRotate180 ) },
{ LSTRKEY( "setRotate270" ), LFUNCVAL( lucg_setRotate270 ) },
{ LSTRKEY( "setScale2x2" ), LFUNCVAL( lucg_setScale2x2 ) },
{ LSTRKEY( "undoClipRange" ), LFUNCVAL( lucg_setMaxClipRange ) },
{ LSTRKEY( "undoRotate" ), LFUNCVAL( lucg_undoRotate ) },
{ LSTRKEY( "undoScale" ), LFUNCVAL( lucg_undoScale ) },
{ LSTRKEY( "__gc" ), LFUNCVAL( lucg_close_display ) },
#if LUA_OPTIMIZE_MEMORY > 0
{ LSTRKEY( "__index" ), LROVAL ( lucg_display_map ) },
#endif
{ LNILKEY, LNILVAL }
};
const LUA_REG_TYPE lucg_map[] =
{
#undef UCG_DISPLAY_TABLE_ENTRY
#define UCG_DISPLAY_TABLE_ENTRY(binding, device, extension) { LSTRKEY( #binding ), LFUNCVAL ( lucg_ ##binding ) },
UCG_DISPLAY_TABLE
#if LUA_OPTIMIZE_MEMORY > 0
// Register fonts
#undef UCG_FONT_TABLE_ENTRY
#define UCG_FONT_TABLE_ENTRY(font) { LSTRKEY( #font ), LUDATA( (void *)(ucg_ ## font) ) },
UCG_FONT_TABLE
// Font modes
{ LSTRKEY( "FONT_MODE_TRANSPARENT" ), LNUMVAL( UCG_FONT_MODE_TRANSPARENT ) },
{ LSTRKEY( "FONT_MODE_SOLID" ), LNUMVAL( UCG_FONT_MODE_SOLID ) },
// Options for circle/ disc drawing
{ LSTRKEY( "DRAW_UPPER_RIGHT" ), LNUMVAL( UCG_DRAW_UPPER_RIGHT ) },
{ LSTRKEY( "DRAW_UPPER_LEFT" ), LNUMVAL( UCG_DRAW_UPPER_LEFT ) },
{ LSTRKEY( "DRAW_LOWER_RIGHT" ), LNUMVAL( UCG_DRAW_LOWER_RIGHT ) },
{ LSTRKEY( "DRAW_LOWER_LEFT" ), LNUMVAL( UCG_DRAW_LOWER_LEFT ) },
{ LSTRKEY( "DRAW_ALL" ), LNUMVAL( UCG_DRAW_ALL ) },
{ LSTRKEY( "__metatable" ), LROVAL( lucg_map ) },
#endif
{ LNILKEY, LNILVAL }
};
LUALIB_API int luaopen_ucg( lua_State *L )
{
#if LUA_OPTIMIZE_MEMORY > 0
luaL_rometatable(L, "ucg.display", (void *)lucg_display_map); // create metatable
return 0;
#else // #if LUA_OPTIMIZE_MEMORY > 0
int n;
luaL_register( L, AUXLIB_UCG, lucg_map );
// Set it as its own metatable
lua_pushvalue( L, -1 );
lua_setmetatable( L, -2 );
// Module constants
// Register fonts
#undef UCG_FONT_TABLE_ENTRY
#define UCG_FONT_TABLE_ENTRY(font) MOD_REG_LUDATA( L, #font, (void *)(ucg_ ## font) );
UCG_FONT_TABLE
// Font modes
MOD_REG_NUMBER( L, "FONT_MODE_TRANSPARENT", UCG_FONT_MODE_TRANSPARENT );
MOD_REG_NUMBER( L, "FONT_MODE_SOLID", UCG_FONT_MODE_SOLID );
// Options for circle/ disc drawing
MOD_REG_NUMBER( L, "DRAW_UPPER_RIGHT", UCG_DRAW_UPPER_RIGHT );
MOD_REG_NUMBER( L, "DRAW_UPPER_LEFT", UCG_DRAW_UPPER_LEFT );
MOD_REG_NUMBER( L, "DRAW_LOWER_RIGHT", UCG_DRAW_LOWER_RIGHT );
MOD_REG_NUMBER( L, "DRAW_LOWER_LEFT", UCG_DRAW_LOWER_LEFT );
MOD_REG_NUMBER( L, "DRAW_ALL", UCG_DRAW_ALL );
// create metatable
luaL_newmetatable(L, "ucg.display");
// metatable.__index = metatable
lua_pushliteral(L, "__index");
lua_pushvalue(L,-2);
lua_rawset(L,-3);
// Setup the methods inside metatable
luaL_register( L, NULL, lucg_display_map );
return 1;
#endif // #if LUA_OPTIMIZE_MEMORY > 0
}
#############################################################
# Required variables for each makefile
# Discard this section from all parent makefiles
# Expected variables (with automatic defaults):
# CSRCS (all "C" files in the dir)
# SUBDIRS (all subdirs with a Makefile)
# GEN_LIBS - list of libs to be generated ()
# GEN_IMAGES - list of images to be generated ()
# COMPONENTS_xxx - a list of libs/objs in the form
# subdir/lib to be extracted and rolled up into
# a generated lib/image xxx.a ()
#
ifndef PDIR
GEN_LIBS = ucglib.a
endif
#############################################################
# Configuration i.e. compile options etc.
# Target specific stuff (defines etc.) goes in here!
# Generally values applying to a tree are captured in the
# makefile at its root level - these are then overridden
# for a subtree within the makefile rooted therein
#
#DEFINES +=
#############################################################
# Recursion Magic - Don't touch this!!
#
# Each subtree potentially has an include directory
# corresponding to the common APIs applicable to modules
# rooted at that subtree. Accordingly, the INCLUDE PATH
# of a module can only contain the include directories up
# its parent path, and not its siblings
#
# Required for each makefile to inherit from the parent
#
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ../libc
PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile
/*
ucg.h
ucglib = universal color graphics library
ucglib = micro controller graphics library
Universal uC Color Graphics Library
Copyright (c) 2013, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SW layers
High Level Procedures
[ hline, init message interface ]
display callback procedure
[Calls to]
device dev cb
[calls to COM API]
com callback
font data:
offset bytes description
0 1 glyph_cnt number of glyphs
1 1 bbx_mode 0: proportional, 1: common height, 2: monospace, 3: multiple of 8
2 1 bits_per_0 glyph rle parameter
3 1 bits_per_1 glyph rle parameter
4 1 bits_per_char_width glyph rle parameter
5 1 bits_per_char_height glyph rle parameter
6 1 bits_per_char_x glyph rle parameter
7 1 bits_per_char_y glyph rle parameter
8 1 bits_per_delta_x glyph rle parameter
9 1 max_char_width
10 1 max_char_height
11 1 x offset
12 1 y offset (descent)
13 1 ascent (capital A)
14 1 descent (lower g)
15 1 ascent '('
16 1 descent ')'
17 1 start pos 'A' high byte
18 1 start pos 'A' low byte
19 1 start pos 'a' high byte
20 1 start pos 'a' low byte
*/
#ifndef _UCG_H
#define _UCG_H
#if defined(__XTENSA__)
# include <c_types.h>
#else
# include <stdint.h>
#endif
#include <stddef.h>
#ifdef __cplusplus
extern "C"
{
#endif
#if defined(ARDUINO) || defined(__XTENSA__)
#ifndef USE_PIN_LIST
#define USE_PIN_LIST
#endif
#endif
#ifdef __GNUC__
# define UCG_NOINLINE __attribute__((noinline))
# define UCG_SECTION(name) __attribute__ ((section (name)))
# if defined(__MSPGCC__)
/* mspgcc does not have .progmem sections. Use -fdata-sections. */
# define UCG_FONT_SECTION(name)
# elif defined(__AVR__)
# define UCG_FONT_SECTION(name) UCG_SECTION(".progmem." name)
# elif defined(__XTENSA__)
# define UCG_FONT_SECTION(name)
# else
# define UCG_FONT_SECTION(name)
# endif
#else
# define UCG_NOINLINE
# define UCG_SECTION(name)
# define UCG_FONT_SECTION(name)
#endif
#if defined(__AVR__)
#include <avr/pgmspace.h>
/* UCG_PROGMEM is used by the XBM example */
#define UCG_PROGMEM UCG_SECTION(".progmem.data")
typedef uint8_t PROGMEM ucg_pgm_uint8_t;
typedef uint8_t ucg_fntpgm_uint8_t;
#define ucg_pgm_read(adr) pgm_read_byte_near(adr)
#define UCG_PSTR(s) ((ucg_pgm_uint8_t *)PSTR(s))
#elif defined(__XTENSA__)
#define UCG_PROGMEM
#define PROGMEM
typedef uint8_t ucg_pgm_uint8_t;
typedef uint8_t ucg_fntpgm_uint8_t;
#define ucg_pgm_read(adr) (*(const ucg_pgm_uint8_t *)(adr))
#define UCG_PSTR(s) ((ucg_pgm_uint8_t *)(s))
#else
#define UCG_PROGMEM
#define PROGMEM
typedef uint8_t ucg_pgm_uint8_t;
typedef uint8_t ucg_fntpgm_uint8_t;
#define ucg_pgm_read(adr) (*(const ucg_pgm_uint8_t *)(adr))
#define UCG_PSTR(s) ((ucg_pgm_uint8_t *)(s))
#endif
/*================================================*/
/* several type and forward definitions */
typedef int16_t ucg_int_t;
typedef struct _ucg_t ucg_t;
typedef struct _ucg_xy_t ucg_xy_t;
typedef struct _ucg_wh_t ucg_wh_t;
typedef struct _ucg_box_t ucg_box_t;
typedef struct _ucg_color_t ucg_color_t;
typedef struct _ucg_ccs_t ucg_ccs_t;
typedef struct _ucg_pixel_t ucg_pixel_t;
typedef struct _ucg_arg_t ucg_arg_t;
typedef struct _ucg_com_info_t ucg_com_info_t;
typedef ucg_int_t (*ucg_dev_fnptr)(ucg_t *ucg, ucg_int_t msg, void *data);
typedef int16_t (*ucg_com_fnptr)(ucg_t *ucg, int16_t msg, uint16_t arg, uint8_t *data);
typedef ucg_int_t (*ucg_font_calc_vref_fnptr)(ucg_t *ucg);
//typedef ucg_int_t (*ucg_font_mode_fnptr)(ucg_t *ucg, ucg_int_t x, ucg_int_t y, uint8_t dir, uint8_t encoding);
/*================================================*/
/* list of supported display modules */
ucg_int_t ucg_dev_ssd1351_18x128x128_ilsoft(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ssd1351_18x128x128_ft(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ili9325_18x240x320_itdb02(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ili9325_spi_18x240x320(ucg_t *ucg, ucg_int_t msg, void *data); /* 1 May 2014: Currently, this is not working */
ucg_int_t ucg_dev_ili9341_18x240x320(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ili9163_18x128x128(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_st7735_18x128x160(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_pcf8833_16x132x132(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ld50t6160_18x160x128_samsung(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ssd1331_18x96x64_univision(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_seps225_16x128x128_univision(ucg_t *ucg, ucg_int_t msg, void *data);
/*================================================*/
/*
list of extensions for the controllers
each module can have the "none" extension (ucg_ext_none) or the specific
extensions, that matches the controller name and color depth.
example: for the module ucg_dev_ssd1351_18x128x128_ilsoft
valid extensions are:
ucg_ext_none
ucg_ext_ssd1351_18
*/
ucg_int_t ucg_ext_none(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_ssd1351_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_ili9325_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_ili9325_spi_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_ili9341_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_ili9163_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_st7735_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_pcf8833_16(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_ld50t6160_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_ssd1331_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_ext_seps225_16(ucg_t *ucg, ucg_int_t msg, void *data);
/*================================================*/
/* list of supported display controllers */
ucg_int_t ucg_dev_ic_ssd1351_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ic_ili9325_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ic_ili9325_spi_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ic_ili9341_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ic_ili9163_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ic_st7735_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ic_pcf8833_16(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ic_ld50t6160_18(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_dev_ic_ssd1331_18(ucg_t *ucg, ucg_int_t msg, void *data); /* actually this display only has 65k colors */
ucg_int_t ucg_dev_ic_seps225_16(ucg_t *ucg, ucg_int_t msg, void *data); /* this display could do 262k colors, but only 65k are supported via SPI */
/*================================================*/
/* struct declarations */
struct _ucg_xy_t
{
ucg_int_t x;
ucg_int_t y;
};
struct _ucg_wh_t
{
ucg_int_t w;
ucg_int_t h;
};
struct _ucg_box_t
{
ucg_xy_t ul;
ucg_wh_t size;
};
struct _ucg_color_t
{
uint8_t color[3]; /* 0: Red, 1: Green, 2: Blue */
};
struct _ucg_ccs_t
{
uint8_t current; /* contains the current color component */
uint8_t start;
ucg_int_t dir; /* 1 if start < end or -1 if start > end */
ucg_int_t num;
ucg_int_t quot;
ucg_int_t den;
ucg_int_t rem;
ucg_int_t frac;
};
struct _ucg_pixel_t
{
ucg_xy_t pos;
ucg_color_t rgb;
};
struct _ucg_arg_t
{
ucg_pixel_t pixel;
ucg_int_t len;
ucg_int_t dir;
ucg_int_t offset; /* calculated offset from the inital point to the start of the clip window (ucg_clip_l90fx) */
ucg_int_t scale; /* upscale factor, used by UCG_MSG_DRAW_L90BF */
const unsigned char *bitmap;
ucg_int_t pixel_skip; /* within the "bitmap" skip the specified number of pixel with the bit. pixel_skip is always <= 7 */
ucg_color_t rgb[4]; /* start and end color for L90SE , two more colors for the gradient box */
ucg_ccs_t ccs_line[3]; /* color component sliders used by L90SE */
};
#define UCG_FONT_HEIGHT_MODE_TEXT 0
#define UCG_FONT_HEIGHT_MODE_XTEXT 1
#define UCG_FONT_HEIGHT_MODE_ALL 2
struct _ucg_com_info_t
{
uint16_t serial_clk_speed;
uint16_t parallel_clk_speed;
};
struct _ucg_font_info_t
{
/* offset 0 */
uint8_t glyph_cnt;
uint8_t bbx_mode;
uint8_t bits_per_0;
uint8_t bits_per_1;
/* offset 4 */
uint8_t bits_per_char_width;
uint8_t bits_per_char_height;
uint8_t bits_per_char_x;
uint8_t bits_per_char_y;
uint8_t bits_per_delta_x;
/* offset 9 */
int8_t max_char_width;
int8_t max_char_height; /* overall height, NOT ascent. Instead ascent = max_char_height + y_offset */
int8_t x_offset;
int8_t y_offset;
/* offset 13 */
int8_t ascent_A;
int8_t descent_g;
int8_t ascent_para;
int8_t descent_para;
/* offset 17 */
uint16_t start_pos_upper_A;
uint16_t start_pos_lower_a;
};
typedef struct _ucg_font_info_t ucg_font_info_t;
struct _ucg_font_decode_t
{
const uint8_t *decode_ptr; /* pointer to the compressed data */
ucg_int_t target_x;
ucg_int_t target_y;
int8_t x; /* local coordinates, (0,0) is upper left */
int8_t y;
int8_t glyph_width;
int8_t glyph_height;
uint8_t decode_bit_pos; /* bitpos inside a byte of the compressed data */
uint8_t is_transparent;
uint8_t dir; /* direction */
};
typedef struct _ucg_font_decode_t ucg_font_decode_t;
#ifdef USE_PIN_LIST
#define UCG_PIN_RST 0
#define UCG_PIN_CD 1
#define UCG_PIN_CS 2
#define UCG_PIN_SCL 3
#define UCG_PIN_WR 3
#define UCG_PIN_SDA 4
#define UCG_PIN_D0 5
#define UCG_PIN_D1 6
#define UCG_PIN_D2 7
#define UCG_PIN_D3 8
#define UCG_PIN_D4 9
#define UCG_PIN_D5 10
#define UCG_PIN_D6 11
#define UCG_PIN_D7 12
#define UCG_PIN_COUNT 13
#define UCG_PIN_VAL_NONE 255
#endif
struct _ucg_t
{
unsigned is_power_up:1;
/* the dimension of the display */
ucg_wh_t dimension;
/* display callback procedure to handle display specific code */
//ucg_dev_fnptr display_cb;
/* controller and device specific code, high level procedure will call this */
ucg_dev_fnptr device_cb;
/* name of the extension cb. will be called by device_cb if required */
ucg_dev_fnptr ext_cb;
/* if rotation is applied, than this cb is called after rotation */
ucg_dev_fnptr rotate_chain_device_cb;
ucg_wh_t rotate_dimension;
/* if rotation is applied, than this cb is called by the scale device */
ucg_dev_fnptr scale_chain_device_cb;
/* communication interface */
ucg_com_fnptr com_cb;
/* offset, that is additionally added to UCG_VARX/UCG_VARY */
/* seems to be required for the Nokia display */
// ucg_xy_t display_offset;
/* data which is passed to the cb procedures */
/* can be modified by the cb procedures (rotation, clipping, etc) */
ucg_arg_t arg;
/* current window to which all drawing is clipped */
/* should be modified via UCG_MSG_SET_CLIP_BOX by a device callback. */
/* by default this is done by ucg_dev_default_cb */
ucg_box_t clip_box;
/* information about the current font */
const unsigned char *font; /* current font for all text procedures */
ucg_font_calc_vref_fnptr font_calc_vref;
//ucg_font_mode_fnptr font_mode; /* OBSOLETE?? UCG_FONT_MODE_TRANSPARENT, UCG_FONT_MODE_SOLID, UCG_FONT_MODE_NONE */
ucg_font_decode_t font_decode; /* new font decode structure */
ucg_font_info_t font_info; /* new font info structure */
int8_t glyph_dx; /* OBSOLETE */
int8_t glyph_x; /* OBSOLETE */
int8_t glyph_y; /* OBSOLETE */
uint8_t glyph_width; /* OBSOLETE */
uint8_t glyph_height; /* OBSOLETE */
uint8_t font_height_mode;
int8_t font_ref_ascent;
int8_t font_ref_descent;
/* only for Arduino/C++ Interface */
#ifdef USE_PIN_LIST
uint8_t pin_list[UCG_PIN_COUNT];
#ifdef __AVR__
volatile uint8_t *data_port[UCG_PIN_COUNT];
uint8_t data_mask[UCG_PIN_COUNT];
#endif
#endif
/*
Small amount of RAM for the com interface (com_cb).
Might be unused on unix systems, where the com sub system is
not required, but should be usefull for all uC projects.
*/
uint8_t com_initial_change_sent; /* Bit 0: CD/A0 Line Status, Bit 1: CS Line Status, Bit 2: Reset Line Status */
uint8_t com_status; /* Bit 0: CD/A0 Line Status, Bit 1: CS Line Status, Bit 2: Reset Line Status, Bit 3: 1 for power up */
uint8_t com_cfg_cd; /* Bit 0: Argument Level, Bit 1: Command Level */
};
#define ucg_GetWidth(ucg) ((ucg)->dimension.w)
#define ucg_GetHeight(ucg) ((ucg)->dimension.h)
#define UCG_MSG_DEV_POWER_UP 10
#define UCG_MSG_DEV_POWER_DOWN 11
#define UCG_MSG_SET_CLIP_BOX 12
#define UCG_MSG_GET_DIMENSION 15
/* draw pixel with color from idx 0 */
#define UCG_MSG_DRAW_PIXEL 20
#define UCG_MSG_DRAW_L90FX 21
/* draw bit pattern, transparent and draw color (idx 0) color */
//#define UCG_MSG_DRAW_L90TC 22 /* can be commented, used by ucg_DrawTransparentBitmapLine */
#define UCG_MSG_DRAW_L90SE 23 /* this part of the extension */
//#define UCG_MSG_DRAW_L90RL 24 /* not yet implemented */
/* draw bit pattern with foreground (idx 1) and background (idx 0) color */
//#define UCG_MSG_DRAW_L90BF 25 /* can be commented, used by ucg_DrawBitmapLine */
#define UCG_COM_STATUS_MASK_POWER 8
#define UCG_COM_STATUS_MASK_RESET 4
#define UCG_COM_STATUS_MASK_CS 2
#define UCG_COM_STATUS_MASK_CD 1
/*
arg: 0
data: ucg_com_info_t *
return: 0 for error
note:
- power up is the first command, which is sent
*/
#define UCG_COM_MSG_POWER_UP 10
/*
note: power down my be followed only by power up command
*/
#define UCG_COM_MSG_POWER_DOWN 11
/*
arg: delay in microseconds (0..4095)
*/
#define UCG_COM_MSG_DELAY 12
/*
ucg->com_status contains previous status of reset line
arg: new logic level for reset line
*/
#define UCG_COM_MSG_CHANGE_RESET_LINE 13
/*
ucg->com_status contains previous status of cs line
arg: new logic level for cs line
*/
#define UCG_COM_MSG_CHANGE_CS_LINE 14
/*
ucg->com_status contains previous status of cd line
arg: new logic level for cd line
*/
#define UCG_COM_MSG_CHANGE_CD_LINE 15
/*
ucg->com_status current status of Reset, CS and CD line (ucg->com_status)
arg: byte for display
*/
#define UCG_COM_MSG_SEND_BYTE 16
/*
ucg->com_status current status of Reset, CS and CD line (ucg->com_status)
arg: how often to repeat the 2/3 byte sequence
data: pointer to two or three bytes
*/
#define UCG_COM_MSG_REPEAT_1_BYTE 17
#define UCG_COM_MSG_REPEAT_2_BYTES 18
#define UCG_COM_MSG_REPEAT_3_BYTES 19
/*
ucg->com_status current status of Reset, CS and CD line (ucg->com_status)
arg: length of string
data: string
*/
#define UCG_COM_MSG_SEND_STR 20
/*
ucg->com_status current status of Reset, CS and CD line (ucg->com_status)
arg: number of cd_info and data pairs (half value of total byte cnt)
data: uint8_t with CD and data information
cd_info data cd_info data cd_info data cd_info data ... cd_info data cd_info data
cd_info is the level, which is directly applied to the CD line. This means,
information applied to UCG_CFG_CD is not relevant.
*/
#define UCG_COM_MSG_SEND_CD_DATA_SEQUENCE 21
/*================================================*/
/* interrupt safe code */
#define UCG_INTERRUPT_SAFE
#if defined(UCG_INTERRUPT_SAFE)
# if defined(__AVR__)
extern uint8_t global_SREG_backup; /* ucg_init.c */
# define UCG_ATOMIC_START() do { global_SREG_backup = SREG; cli(); } while(0)
# define UCG_ATOMIC_END() SREG = global_SREG_backup
# define UCG_ATOMIC_OR(ptr, val) do { uint8_t tmpSREG = SREG; cli(); (*(ptr) |= (val)); SREG = tmpSREG; } while(0)
# define UCG_ATOMIC_AND(ptr, val) do { uint8_t tmpSREG = SREG; cli(); (*(ptr) &= (val)); SREG = tmpSREG; } while(0)
# else
# define UCG_ATOMIC_OR(ptr, val) (*(ptr) |= (val))
# define UCG_ATOMIC_AND(ptr, val) (*(ptr) &= (val))
# define UCG_ATOMIC_START()
# define UCG_ATOMIC_END()
# endif /* __AVR__ */
#else
# define UCG_ATOMIC_OR(ptr, val) (*(ptr) |= (val))
# define UCG_ATOMIC_AND(ptr, val) (*(ptr) &= (val))
# define UCG_ATOMIC_START()
# define UCG_ATOMIC_END()
#endif /* UCG_INTERRUPT_SAFE */
/*================================================*/
/* ucg_dev_msg_api.c */
void ucg_PowerDown(ucg_t *ucg);
ucg_int_t ucg_PowerUp(ucg_t *ucg);
void ucg_SetClipBox(ucg_t *ucg, ucg_box_t *clip_box);
void ucg_SetClipRange(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h);
void ucg_SetMaxClipRange(ucg_t *ucg);
void ucg_GetDimension(ucg_t *ucg);
void ucg_DrawPixelWithArg(ucg_t *ucg);
void ucg_DrawL90FXWithArg(ucg_t *ucg);
void ucg_DrawL90TCWithArg(ucg_t *ucg);
void ucg_DrawL90BFWithArg(ucg_t *ucg);
void ucg_DrawL90SEWithArg(ucg_t *ucg);
/* void ucg_DrawL90RLWithArg(ucg_t *ucg); */
/*================================================*/
/* ucg_init.c */
ucg_int_t ucg_Init(ucg_t *ucg, ucg_dev_fnptr device_cb, ucg_dev_fnptr ext_cb, ucg_com_fnptr com_cb);
/*================================================*/
/* ucg_dev_sdl.c */
ucg_int_t ucg_sdl_dev_cb(ucg_t *ucg, ucg_int_t msg, void *data);
/*================================================*/
/* ucg_pixel.c */
void ucg_SetColor(ucg_t *ucg, uint8_t idx, uint8_t r, uint8_t g, uint8_t b);
void ucg_DrawPixel(ucg_t *ucg, ucg_int_t x, ucg_int_t y);
/*================================================*/
/* ucg_line.c */
void ucg_Draw90Line(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t len, ucg_int_t dir, ucg_int_t col_idx);
void ucg_DrawHLine(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t len);
void ucg_DrawVLine(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t len);
void ucg_DrawHRLine(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t len);
void ucg_DrawLine(ucg_t *ucg, ucg_int_t x1, ucg_int_t y1, ucg_int_t x2, ucg_int_t y2);
/* the following procedure is only available with the extended callback */
void ucg_DrawGradientLine(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t len, ucg_int_t dir);
/*================================================*/
/* ucg_box.c */
void ucg_DrawBox(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h);
void ucg_ClearScreen(ucg_t *ucg);
void ucg_DrawRBox(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h, ucg_int_t r);
void ucg_DrawGradientBox(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h);
void ucg_DrawFrame(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h);
void ucg_DrawRFrame(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h, ucg_int_t r);
/*================================================*/
/* ucg_circle.c */
#define UCG_DRAW_UPPER_RIGHT 0x01
#define UCG_DRAW_UPPER_LEFT 0x02
#define UCG_DRAW_LOWER_LEFT 0x04
#define UCG_DRAW_LOWER_RIGHT 0x08
#define UCG_DRAW_ALL (UCG_DRAW_UPPER_RIGHT|UCG_DRAW_UPPER_LEFT|UCG_DRAW_LOWER_RIGHT|UCG_DRAW_LOWER_LEFT)
void ucg_DrawDisc(ucg_t *ucg, ucg_int_t x0, ucg_int_t y0, ucg_int_t rad, uint8_t option);
void ucg_DrawCircle(ucg_t *ucg, ucg_int_t x0, ucg_int_t y0, ucg_int_t rad, uint8_t option);
/*================================================*/
/* ucg_bitmap.c */
void ucg_DrawTransparentBitmapLine(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t dir, ucg_int_t len, const unsigned char *bitmap);
void ucg_DrawBitmapLine(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t dir, ucg_int_t len, const unsigned char *bitmap);
/* void ucg_DrawRLBitmap(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t dir, const unsigned char *rl_bitmap); */
/*================================================*/
/* ucg_rotate.c */
void ucg_UndoRotate(ucg_t *ucg);
void ucg_SetRotate90(ucg_t *ucg);
void ucg_SetRotate180(ucg_t *ucg);
void ucg_SetRotate270(ucg_t *ucg);
/*================================================*/
/* ucg_scale.c */
void ucg_UndoScale(ucg_t *ucg);
void ucg_SetScale2x2(ucg_t *ucg);
/*================================================*/
/* ucg_polygon.c */
typedef int16_t pg_word_t;
#define PG_NOINLINE UCG_NOINLINE
struct pg_point_struct
{
pg_word_t x;
pg_word_t y;
};
typedef struct _pg_struct pg_struct; /* forward declaration */
struct pg_edge_struct
{
pg_word_t x_direction; /* 1, if x2 is greater than x1, -1 otherwise */
pg_word_t height;
pg_word_t current_x_offset;
pg_word_t error_offset;
/* --- line loop --- */
pg_word_t current_y;
pg_word_t max_y;
pg_word_t current_x;
pg_word_t error;
/* --- outer loop --- */
uint8_t (*next_idx_fn)(pg_struct *pg, uint8_t i);
uint8_t curr_idx;
};
/* maximum number of points in the polygon */
/* can be redefined, but highest possible value is 254 */
#define PG_MAX_POINTS 4
/* index numbers for the pge structures below */
#define PG_LEFT 0
#define PG_RIGHT 1
struct _pg_struct
{
struct pg_point_struct list[PG_MAX_POINTS];
uint8_t cnt;
uint8_t is_min_y_not_flat;
pg_word_t total_scan_line_cnt;
struct pg_edge_struct pge[2]; /* left and right line draw structures */
};
void pg_ClearPolygonXY(pg_struct *pg);
void pg_AddPolygonXY(pg_struct *pg, ucg_t *ucg, int16_t x, int16_t y);
void pg_DrawPolygon(pg_struct *pg, ucg_t *ucg);
void ucg_ClearPolygonXY(void);
void ucg_AddPolygonXY(ucg_t *ucg, int16_t x, int16_t y);
void ucg_DrawPolygon(ucg_t *ucg);
void ucg_DrawTriangle(ucg_t *ucg, int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2);
/* the polygon procedure only works for convex tetragons (http://en.wikipedia.org/wiki/Convex_polygon) */
void ucg_DrawTetragon(ucg_t *ucg, int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3);
/*================================================*/
/* ucg_font.c */
//ucg_int_t ucg_draw_transparent_glyph(ucg_t *ucg, ucg_int_t x, ucg_int_t y, uint8_t dir, uint8_t encoding);
//ucg_int_t ucg_draw_solid_glyph(ucg_t *ucg, ucg_int_t x, ucg_int_t y, uint8_t dir, uint8_t encoding);
// old font procedures
//#define UCG_FONT_MODE_TRANSPARENT ucg_draw_transparent_glyph
//#define UCG_FONT_MODE_SOLID ucg_draw_solid_glyph
//#define UCG_FONT_MODE_NONE ((ucg_font_mode_fnptr)0)
// new font procedures
#define UCG_FONT_MODE_TRANSPARENT 1
#define UCG_FONT_MODE_SOLID 0
#define UCG_FONT_MODE_NONE 1
/* Information on a specific given font */
uint8_t ucg_font_GetFontStartEncoding(const void *font);
uint8_t ucg_font_GetFontEndEncoding(const void *font);
uint8_t ucg_font_GetCapitalAHeight(const void *font);
int8_t ucg_font_GetFontAscent(const void *font);
int8_t ucg_font_GetFontDescent(const void *font);
int8_t ucg_font_GetFontXAscent(const void *font);
int8_t ucg_font_GetFontXDescent(const void *font);
size_t ucg_font_GetSize(const void *font);
/* Information on the current font */
uint8_t ucg_GetFontBBXWidth(ucg_t *ucg);
uint8_t ucg_GetFontBBXHeight(ucg_t *ucg);
uint8_t ucg_GetFontCapitalAHeight(ucg_t *ucg) UCG_NOINLINE;
uint8_t ucg_IsGlyph(ucg_t *ucg, uint8_t requested_encoding);
int8_t ucg_GetGlyphWidth(ucg_t *ucg, uint8_t requested_encoding);
#define ucg_GetFontAscent(ucg) ((ucg)->font_ref_ascent)
#define ucg_GetFontDescent(ucg) ((ucg)->font_ref_descent)
/* Drawing procedures */
ucg_int_t ucg_DrawGlyph(ucg_t *ucg, ucg_int_t x, ucg_int_t y, uint8_t dir, uint8_t encoding);
ucg_int_t ucg_DrawString(ucg_t *ucg, ucg_int_t x, ucg_int_t y, uint8_t dir, const char *str);
/* Mode selection/Font assignment */
void ucg_SetFontRefHeightText(ucg_t *ucg);
void ucg_SetFontRefHeightExtendedText(ucg_t *ucg);
void ucg_SetFontRefHeightAll(ucg_t *ucg);
void ucg_SetFontPosBaseline(ucg_t *ucg) UCG_NOINLINE;
void ucg_SetFontPosBottom(ucg_t *ucg);
void ucg_SetFontPosTop(ucg_t *ucg);
void ucg_SetFontPosCenter(ucg_t *ucg);
void ucg_SetFont(ucg_t *ucg, const ucg_fntpgm_uint8_t *font);
//void ucg_SetFontMode(ucg_t *ucg, ucg_font_mode_fnptr font_mode);
void ucg_SetFontMode(ucg_t *ucg, uint8_t is_transparent);
ucg_int_t ucg_GetStrWidth(ucg_t *ucg, const char *s);
/*================================================*/
/* LOW LEVEL PROCEDRUES, ONLY CALLED BY DEV CB */
/*================================================*/
/* ucg_clip.c */
ucg_int_t ucg_clip_is_pixel_visible(ucg_t *ucg);
ucg_int_t ucg_clip_l90fx(ucg_t *ucg);
ucg_int_t ucg_clip_l90tc(ucg_t *ucg);
ucg_int_t ucg_clip_l90se(ucg_t *ucg);
/*================================================*/
/* ucg_ccs.c */
void ucg_ccs_init(ucg_ccs_t *ccs, uint8_t start, uint8_t end, ucg_int_t steps);
void ucg_ccs_step(ucg_ccs_t *ccs);
void ucg_ccs_seek(ucg_ccs_t *ccs, ucg_int_t pos);
/*================================================*/
/* ucg_dev_default_cb.c */
ucg_int_t ucg_dev_default_cb(ucg_t *ucg, ucg_int_t msg, void *data);
ucg_int_t ucg_handle_l90fx(ucg_t *ucg, ucg_dev_fnptr dev_cb);
ucg_int_t ucg_handle_l90tc(ucg_t *ucg, ucg_dev_fnptr dev_cb);
ucg_int_t ucg_handle_l90se(ucg_t *ucg, ucg_dev_fnptr dev_cb);
ucg_int_t ucg_handle_l90bf(ucg_t *ucg, ucg_dev_fnptr dev_cb);
void ucg_handle_l90rl(ucg_t *ucg, ucg_dev_fnptr dev_cb);
/*================================================*/
/* ucg_com_msg_api.c */
/* send command bytes and optional arguments */
#define UCG_C10(c0) 0x010, (c0)
#define UCG_C20(c0,c1) 0x020, (c0),(c1)
#define UCG_C11(c0,a0) 0x011, (c0),(a0)
#define UCG_C21(c0,c1,a0) 0x021, (c0),(c1),(a0)
#define UCG_C12(c0,a0,a1) 0x012, (c0),(a0),(a1)
#define UCG_C22(c0,c1,a0,a1) 0x022, (c0),(c1),(a0),(a1)
#define UCG_C13(c0,a0,a1,a2) 0x013, (c0),(a0),(a1),(a2)
#define UCG_C23(c0,c1,a0,a1,a2) 0x023, (c0),(c1),(a0),(a1),(a2)
#define UCG_C14(c0,a0,a1,a2,a3) 0x014, (c0),(a0),(a1),(a2),(a3)
#define UCG_C24(c0,c1,a0,a1,a2,a3) 0x024, (c0),(c1),(a0),(a1),(a2),(a3)
#define UCG_C15(c0,a0,a1,a2,a3,a4) 0x015, (c0),(a0),(a1),(a2),(a3),(a4)
/* send one or more argument bytes */
#define UCG_A1(d0) 0x061, (d0)
#define UCG_A2(d0,d1) 0x062, (d0),(d1)
#define UCG_A3(d0,d1,d2) 0x063, (d0),(d1),(d2)
#define UCG_A4(d0,d1,d2,d3) 0x064, (d0),(d1),(d2),(d3)
#define UCG_A5(d0,d1,d2,d3,d4) 0x065, (d0),(d1),(d2),(d3),(d4)
#define UCG_A6(d0,d1,d2,d3,d4,d5) 0x066, (d0),(d1),(d2),(d3),(d4),(d5)
#define UCG_A7(d0,d1,d2,d3,d4,d5,d6) 0x067, (d0),(d1),(d2),(d3),(d4),(d5),(d6)
#define UCG_A8(d0,d1,d2,d3,d4,d5,d6,d7) 0x068, (d0),(d1),(d2),(d3),(d4),(d5),(d6),(d7)
/* force data mode on CD line */
#define UCG_DATA() 0x070
/* send one or more data bytes */
#define UCG_D1(d0) 0x071, (d0)
#define UCG_D2(d0,d1) 0x072, (d0),(d1)
#define UCG_D3(d0,d1,d2) 0x073, (d0),(d1),(d2)
#define UCG_D4(d0,d1,d2,d3) 0x074, (d0),(d1),(d2),(d3)
#define UCG_D5(d0,d1,d2,d3,d4) 0x075, (d0),(d1),(d2),(d3),(d4)
#define UCG_D6(d0,d1,d2,d3,d4,d5) 0x076, (d0),(d1),(d2),(d3),(d4),(d5)
/* delay by specified value. t = [0..4095] */
#define UCG_DLY_MS(t) 0x080 | (((t)>>8)&15), (t)&255
#define UCG_DLY_US(t) 0x090 | (((t)>>8)&15), (t)&255
/* access procedures to ucg->arg.pixel.pos.x und ucg->arg.pixel.pos.y */
#define UCG_VARX(s,a,o) 0x0a0 | ((s)&15), (a), (o)
#define UCG_VARY(s,a,o) 0x0b0 | ((s)&15), (a), (o)
/* force specific level on RST und CS */
#define UCG_RST(level) 0x0f0 | ((level)&1)
#define UCG_CS(level) 0x0f4 | ((level)&1)
/* Configure CD line for command, arguments and data */
/* Configure CMD/DATA line: "c" logic level CMD, "a" logic level CMD Args */
#define UCG_CFG_CD(c,a) 0x0fc | (((c)&1)<<1) | ((a)&1)
/* Termination byte */
#define UCG_END() 0x00
/*
#define ucg_com_SendByte(ucg, byte) \
(ucg)->com_cb((ucg), UCG_COM_MSG_SEND_BYTE, (byte), NULL)
*/
#define ucg_com_SendRepeat3Bytes(ucg, cnt, byte_ptr) \
(ucg)->com_cb((ucg), UCG_COM_MSG_REPEAT_3_BYTES, (cnt), (byte_ptr))
void ucg_com_PowerDown(ucg_t *ucg);
int16_t ucg_com_PowerUp(ucg_t *ucg, uint16_t serial_clk_speed, uint16_t parallel_clk_speed); /* values are nano seconds */
void ucg_com_SetLineStatus(ucg_t *ucg, uint8_t level, uint8_t mask, uint8_t msg) UCG_NOINLINE;
void ucg_com_SetResetLineStatus(ucg_t *ucg, uint8_t level);
void ucg_com_SetCSLineStatus(ucg_t *ucg, uint8_t level);
void ucg_com_SetCDLineStatus(ucg_t *ucg, uint8_t level);
void ucg_com_DelayMicroseconds(ucg_t *ucg, uint16_t delay) UCG_NOINLINE;
void ucg_com_DelayMilliseconds(ucg_t *ucg, uint16_t delay) UCG_NOINLINE;
#ifndef ucg_com_SendByte
void ucg_com_SendByte(ucg_t *ucg, uint8_t byte);
#endif
void ucg_com_SendRepeatByte(ucg_t *ucg, uint16_t cnt, uint8_t byte);
void ucg_com_SendRepeat2Bytes(ucg_t *ucg, uint16_t cnt, uint8_t *byte_ptr);
#ifndef ucg_com_SendRepeat3Bytes
void ucg_com_SendRepeat3Bytes(ucg_t *ucg, uint16_t cnt, uint8_t *byte_ptr);
#endif
void ucg_com_SendString(ucg_t *ucg, uint16_t cnt, const uint8_t *byte_ptr);
void ucg_com_SendCmdDataSequence(ucg_t *ucg, uint16_t cnt, const uint8_t *byte_ptr, uint8_t cd_line_status_at_end);
void ucg_com_SendCmdSeq(ucg_t *ucg, const ucg_pgm_uint8_t *data);
/*================================================*/
/* ucg_dev_tga.c */
int tga_init(uint16_t w, uint16_t h);
void tga_save(const char *name);
ucg_int_t ucg_dev_tga(ucg_t *ucg, ucg_int_t msg, void *data);
/*================================================*/
#ifdef OLD_FONTS
extern const ucg_fntpgm_uint8_t ucg_font_04b_03b[] UCG_FONT_SECTION("ucg_font_04b_03b");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03bn[] UCG_FONT_SECTION("ucg_font_04b_03bn");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03br[] UCG_FONT_SECTION("ucg_font_04b_03br");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03[] UCG_FONT_SECTION("ucg_font_04b_03");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03n[] UCG_FONT_SECTION("ucg_font_04b_03n");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03r[] UCG_FONT_SECTION("ucg_font_04b_03r");
extern const ucg_fntpgm_uint8_t ucg_font_04b_24[] UCG_FONT_SECTION("ucg_font_04b_24");
extern const ucg_fntpgm_uint8_t ucg_font_04b_24n[] UCG_FONT_SECTION("ucg_font_04b_24n");
extern const ucg_fntpgm_uint8_t ucg_font_04b_24r[] UCG_FONT_SECTION("ucg_font_04b_24r");
extern const ucg_fntpgm_uint8_t ucg_font_10x20_67_75[] UCG_FONT_SECTION("ucg_font_10x20_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_10x20_75r[] UCG_FONT_SECTION("ucg_font_10x20_75r");
extern const ucg_fntpgm_uint8_t ucg_font_10x20_78_79[] UCG_FONT_SECTION("ucg_font_10x20_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_10x20[] UCG_FONT_SECTION("ucg_font_10x20");
extern const ucg_fntpgm_uint8_t ucg_font_10x20r[] UCG_FONT_SECTION("ucg_font_10x20r");
extern const ucg_fntpgm_uint8_t ucg_font_4x6[] UCG_FONT_SECTION("ucg_font_4x6");
extern const ucg_fntpgm_uint8_t ucg_font_4x6r[] UCG_FONT_SECTION("ucg_font_4x6r");
extern const ucg_fntpgm_uint8_t ucg_font_5x7[] UCG_FONT_SECTION("ucg_font_5x7");
extern const ucg_fntpgm_uint8_t ucg_font_5x7r[] UCG_FONT_SECTION("ucg_font_5x7r");
extern const ucg_fntpgm_uint8_t ucg_font_5x8[] UCG_FONT_SECTION("ucg_font_5x8");
extern const ucg_fntpgm_uint8_t ucg_font_5x8r[] UCG_FONT_SECTION("ucg_font_5x8r");
extern const ucg_fntpgm_uint8_t ucg_font_6x10[] UCG_FONT_SECTION("ucg_font_6x10");
extern const ucg_fntpgm_uint8_t ucg_font_6x10r[] UCG_FONT_SECTION("ucg_font_6x10r");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_67_75[] UCG_FONT_SECTION("ucg_font_6x12_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_75r[] UCG_FONT_SECTION("ucg_font_6x12_75r");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_78_79[] UCG_FONT_SECTION("ucg_font_6x12_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_6x12[] UCG_FONT_SECTION("ucg_font_6x12");
extern const ucg_fntpgm_uint8_t ucg_font_6x12r[] UCG_FONT_SECTION("ucg_font_6x12r");
extern const ucg_fntpgm_uint8_t ucg_font_6x13_67_75[] UCG_FONT_SECTION("ucg_font_6x13_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_6x13_75r[] UCG_FONT_SECTION("ucg_font_6x13_75r");
extern const ucg_fntpgm_uint8_t ucg_font_6x13_78_79[] UCG_FONT_SECTION("ucg_font_6x13_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_6x13B[] UCG_FONT_SECTION("ucg_font_6x13B");
extern const ucg_fntpgm_uint8_t ucg_font_6x13Br[] UCG_FONT_SECTION("ucg_font_6x13Br");
extern const ucg_fntpgm_uint8_t ucg_font_6x13[] UCG_FONT_SECTION("ucg_font_6x13");
extern const ucg_fntpgm_uint8_t ucg_font_6x13O[] UCG_FONT_SECTION("ucg_font_6x13O");
extern const ucg_fntpgm_uint8_t ucg_font_6x13Or[] UCG_FONT_SECTION("ucg_font_6x13Or");
extern const ucg_fntpgm_uint8_t ucg_font_6x13r[] UCG_FONT_SECTION("ucg_font_6x13r");
extern const ucg_fntpgm_uint8_t ucg_font_7x13_67_75[] UCG_FONT_SECTION("ucg_font_7x13_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_7x13_75r[] UCG_FONT_SECTION("ucg_font_7x13_75r");
extern const ucg_fntpgm_uint8_t ucg_font_7x13B[] UCG_FONT_SECTION("ucg_font_7x13B");
extern const ucg_fntpgm_uint8_t ucg_font_7x13Br[] UCG_FONT_SECTION("ucg_font_7x13Br");
extern const ucg_fntpgm_uint8_t ucg_font_7x13[] UCG_FONT_SECTION("ucg_font_7x13");
extern const ucg_fntpgm_uint8_t ucg_font_7x13O[] UCG_FONT_SECTION("ucg_font_7x13O");
extern const ucg_fntpgm_uint8_t ucg_font_7x13Or[] UCG_FONT_SECTION("ucg_font_7x13Or");
extern const ucg_fntpgm_uint8_t ucg_font_7x13r[] UCG_FONT_SECTION("ucg_font_7x13r");
extern const ucg_fntpgm_uint8_t ucg_font_7x14B[] UCG_FONT_SECTION("ucg_font_7x14B");
extern const ucg_fntpgm_uint8_t ucg_font_7x14Br[] UCG_FONT_SECTION("ucg_font_7x14Br");
extern const ucg_fntpgm_uint8_t ucg_font_7x14[] UCG_FONT_SECTION("ucg_font_7x14");
extern const ucg_fntpgm_uint8_t ucg_font_7x14r[] UCG_FONT_SECTION("ucg_font_7x14r");
extern const ucg_fntpgm_uint8_t ucg_font_8x13_67_75[] UCG_FONT_SECTION("ucg_font_8x13_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_8x13_75r[] UCG_FONT_SECTION("ucg_font_8x13_75r");
extern const ucg_fntpgm_uint8_t ucg_font_8x13B[] UCG_FONT_SECTION("ucg_font_8x13B");
extern const ucg_fntpgm_uint8_t ucg_font_8x13Br[] UCG_FONT_SECTION("ucg_font_8x13Br");
extern const ucg_fntpgm_uint8_t ucg_font_8x13[] UCG_FONT_SECTION("ucg_font_8x13");
extern const ucg_fntpgm_uint8_t ucg_font_8x13O[] UCG_FONT_SECTION("ucg_font_8x13O");
extern const ucg_fntpgm_uint8_t ucg_font_8x13Or[] UCG_FONT_SECTION("ucg_font_8x13Or");
extern const ucg_fntpgm_uint8_t ucg_font_8x13r[] UCG_FONT_SECTION("ucg_font_8x13r");
extern const ucg_fntpgm_uint8_t ucg_font_9x15_67_75[] UCG_FONT_SECTION("ucg_font_9x15_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_9x15_75r[] UCG_FONT_SECTION("ucg_font_9x15_75r");
extern const ucg_fntpgm_uint8_t ucg_font_9x15_78_79[] UCG_FONT_SECTION("ucg_font_9x15_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_9x15B[] UCG_FONT_SECTION("ucg_font_9x15B");
extern const ucg_fntpgm_uint8_t ucg_font_9x15Br[] UCG_FONT_SECTION("ucg_font_9x15Br");
extern const ucg_fntpgm_uint8_t ucg_font_9x15[] UCG_FONT_SECTION("ucg_font_9x15");
extern const ucg_fntpgm_uint8_t ucg_font_9x15r[] UCG_FONT_SECTION("ucg_font_9x15r");
extern const ucg_fntpgm_uint8_t ucg_font_9x18_67_75[] UCG_FONT_SECTION("ucg_font_9x18_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_9x18_75r[] UCG_FONT_SECTION("ucg_font_9x18_75r");
extern const ucg_fntpgm_uint8_t ucg_font_9x18_78_79[] UCG_FONT_SECTION("ucg_font_9x18_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_9x18B[] UCG_FONT_SECTION("ucg_font_9x18B");
extern const ucg_fntpgm_uint8_t ucg_font_9x18Br[] UCG_FONT_SECTION("ucg_font_9x18Br");
extern const ucg_fntpgm_uint8_t ucg_font_9x18[] UCG_FONT_SECTION("ucg_font_9x18");
extern const ucg_fntpgm_uint8_t ucg_font_9x18r[] UCG_FONT_SECTION("ucg_font_9x18r");
extern const ucg_fntpgm_uint8_t ucg_font_baby[] UCG_FONT_SECTION("ucg_font_baby");
extern const ucg_fntpgm_uint8_t ucg_font_babyn[] UCG_FONT_SECTION("ucg_font_babyn");
extern const ucg_fntpgm_uint8_t ucg_font_babyr[] UCG_FONT_SECTION("ucg_font_babyr");
extern const ucg_fntpgm_uint8_t ucg_font_blipfest_07[] UCG_FONT_SECTION("ucg_font_blipfest_07");
extern const ucg_fntpgm_uint8_t ucg_font_blipfest_07n[] UCG_FONT_SECTION("ucg_font_blipfest_07n");
extern const ucg_fntpgm_uint8_t ucg_font_blipfest_07r[] UCG_FONT_SECTION("ucg_font_blipfest_07r");
extern const ucg_fntpgm_uint8_t ucg_font_chikita[] UCG_FONT_SECTION("ucg_font_chikita");
extern const ucg_fntpgm_uint8_t ucg_font_chikitan[] UCG_FONT_SECTION("ucg_font_chikitan");
extern const ucg_fntpgm_uint8_t ucg_font_chikitar[] UCG_FONT_SECTION("ucg_font_chikitar");
extern const ucg_fntpgm_uint8_t ucg_font_courB08[] UCG_FONT_SECTION("ucg_font_courB08");
extern const ucg_fntpgm_uint8_t ucg_font_courB08r[] UCG_FONT_SECTION("ucg_font_courB08r");
extern const ucg_fntpgm_uint8_t ucg_font_courB10[] UCG_FONT_SECTION("ucg_font_courB10");
extern const ucg_fntpgm_uint8_t ucg_font_courB10r[] UCG_FONT_SECTION("ucg_font_courB10r");
extern const ucg_fntpgm_uint8_t ucg_font_courB12[] UCG_FONT_SECTION("ucg_font_courB12");
extern const ucg_fntpgm_uint8_t ucg_font_courB12r[] UCG_FONT_SECTION("ucg_font_courB12r");
extern const ucg_fntpgm_uint8_t ucg_font_courB14[] UCG_FONT_SECTION("ucg_font_courB14");
extern const ucg_fntpgm_uint8_t ucg_font_courB14r[] UCG_FONT_SECTION("ucg_font_courB14r");
extern const ucg_fntpgm_uint8_t ucg_font_courB18[] UCG_FONT_SECTION("ucg_font_courB18");
extern const ucg_fntpgm_uint8_t ucg_font_courB18r[] UCG_FONT_SECTION("ucg_font_courB18r");
extern const ucg_fntpgm_uint8_t ucg_font_courB24[] UCG_FONT_SECTION("ucg_font_courB24");
extern const ucg_fntpgm_uint8_t ucg_font_courB24r[] UCG_FONT_SECTION("ucg_font_courB24r");
extern const ucg_fntpgm_uint8_t ucg_font_courB24n[] UCG_FONT_SECTION("ucg_font_courB24n");
extern const ucg_fntpgm_uint8_t ucg_font_courR08[] UCG_FONT_SECTION("ucg_font_courR08");
extern const ucg_fntpgm_uint8_t ucg_font_courR08r[] UCG_FONT_SECTION("ucg_font_courR08r");
extern const ucg_fntpgm_uint8_t ucg_font_courR10[] UCG_FONT_SECTION("ucg_font_courR10");
extern const ucg_fntpgm_uint8_t ucg_font_courR10r[] UCG_FONT_SECTION("ucg_font_courR10r");
extern const ucg_fntpgm_uint8_t ucg_font_courR12[] UCG_FONT_SECTION("ucg_font_courR12");
extern const ucg_fntpgm_uint8_t ucg_font_courR12r[] UCG_FONT_SECTION("ucg_font_courR12r");
extern const ucg_fntpgm_uint8_t ucg_font_courR14[] UCG_FONT_SECTION("ucg_font_courR14");
extern const ucg_fntpgm_uint8_t ucg_font_courR14r[] UCG_FONT_SECTION("ucg_font_courR14r");
extern const ucg_fntpgm_uint8_t ucg_font_courR18[] UCG_FONT_SECTION("ucg_font_courR18");
extern const ucg_fntpgm_uint8_t ucg_font_courR18r[] UCG_FONT_SECTION("ucg_font_courR18r");
extern const ucg_fntpgm_uint8_t ucg_font_courR24[] UCG_FONT_SECTION("ucg_font_courR24");
extern const ucg_fntpgm_uint8_t ucg_font_courR24n[] UCG_FONT_SECTION("ucg_font_courR24n");
extern const ucg_fntpgm_uint8_t ucg_font_courR24r[] UCG_FONT_SECTION("ucg_font_courR24r");
extern const ucg_fntpgm_uint8_t ucg_font_cu12_67_75[] UCG_FONT_SECTION("ucg_font_cu12_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_cu12_75r[] UCG_FONT_SECTION("ucg_font_cu12_75r");
extern const ucg_fntpgm_uint8_t ucg_font_cu12[] UCG_FONT_SECTION("ucg_font_cu12");
extern const ucg_fntpgm_uint8_t ucg_font_cursor[] UCG_FONT_SECTION("ucg_font_cursor");
extern const ucg_fntpgm_uint8_t ucg_font_cursorr[] UCG_FONT_SECTION("ucg_font_cursorr");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0[] UCG_FONT_SECTION("ucg_font_fixed_v0");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0n[] UCG_FONT_SECTION("ucg_font_fixed_v0n");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0r[] UCG_FONT_SECTION("ucg_font_fixed_v0r");
extern const ucg_fntpgm_uint8_t ucg_font_freedoomr10r[] UCG_FONT_SECTION("ucg_font_freedoomr10r");
extern const ucg_fntpgm_uint8_t ucg_font_freedoomr25n[] UCG_FONT_SECTION("ucg_font_freedoomr25n");
extern const ucg_fntpgm_uint8_t ucg_font_helvB08[] UCG_FONT_SECTION("ucg_font_helvB08");
extern const ucg_fntpgm_uint8_t ucg_font_helvB08r[] UCG_FONT_SECTION("ucg_font_helvB08r");
extern const ucg_fntpgm_uint8_t ucg_font_helvB10[] UCG_FONT_SECTION("ucg_font_helvB10");
extern const ucg_fntpgm_uint8_t ucg_font_helvB10r[] UCG_FONT_SECTION("ucg_font_helvB10r");
extern const ucg_fntpgm_uint8_t ucg_font_helvB12[] UCG_FONT_SECTION("ucg_font_helvB12");
extern const ucg_fntpgm_uint8_t ucg_font_helvB12r[] UCG_FONT_SECTION("ucg_font_helvB12r");
extern const ucg_fntpgm_uint8_t ucg_font_helvB14[] UCG_FONT_SECTION("ucg_font_helvB14");
extern const ucg_fntpgm_uint8_t ucg_font_helvB14r[] UCG_FONT_SECTION("ucg_font_helvB14r");
extern const ucg_fntpgm_uint8_t ucg_font_helvB18[] UCG_FONT_SECTION("ucg_font_helvB18");
extern const ucg_fntpgm_uint8_t ucg_font_helvB18r[] UCG_FONT_SECTION("ucg_font_helvB18r");
extern const ucg_fntpgm_uint8_t ucg_font_helvB24[] UCG_FONT_SECTION("ucg_font_helvB24");
extern const ucg_fntpgm_uint8_t ucg_font_helvB24n[] UCG_FONT_SECTION("ucg_font_helvB24n");
extern const ucg_fntpgm_uint8_t ucg_font_helvB24r[] UCG_FONT_SECTION("ucg_font_helvB24r");
extern const ucg_fntpgm_uint8_t ucg_font_helvR08[] UCG_FONT_SECTION("ucg_font_helvR08");
extern const ucg_fntpgm_uint8_t ucg_font_helvR08r[] UCG_FONT_SECTION("ucg_font_helvR08r");
extern const ucg_fntpgm_uint8_t ucg_font_helvR10[] UCG_FONT_SECTION("ucg_font_helvR10");
extern const ucg_fntpgm_uint8_t ucg_font_helvR10r[] UCG_FONT_SECTION("ucg_font_helvR10r");
extern const ucg_fntpgm_uint8_t ucg_font_helvR12[] UCG_FONT_SECTION("ucg_font_helvR12");
extern const ucg_fntpgm_uint8_t ucg_font_helvR12r[] UCG_FONT_SECTION("ucg_font_helvR12r");
extern const ucg_fntpgm_uint8_t ucg_font_helvR14[] UCG_FONT_SECTION("ucg_font_helvR14");
extern const ucg_fntpgm_uint8_t ucg_font_helvR14r[] UCG_FONT_SECTION("ucg_font_helvR14r");
extern const ucg_fntpgm_uint8_t ucg_font_helvR18[] UCG_FONT_SECTION("ucg_font_helvR18");
extern const ucg_fntpgm_uint8_t ucg_font_helvR18r[] UCG_FONT_SECTION("ucg_font_helvR18r");
extern const ucg_fntpgm_uint8_t ucg_font_helvR24[] UCG_FONT_SECTION("ucg_font_helvR24");
extern const ucg_fntpgm_uint8_t ucg_font_helvR24n[] UCG_FONT_SECTION("ucg_font_helvR24n");
extern const ucg_fntpgm_uint8_t ucg_font_helvR24r[] UCG_FONT_SECTION("ucg_font_helvR24r");
extern const ucg_fntpgm_uint8_t ucg_font_lucasfont_alternate[] UCG_FONT_SECTION("ucg_font_lucasfont_alternate");
extern const ucg_fntpgm_uint8_t ucg_font_lucasfont_alternaten[] UCG_FONT_SECTION("ucg_font_lucasfont_alternaten");
extern const ucg_fntpgm_uint8_t ucg_font_lucasfont_alternater[] UCG_FONT_SECTION("ucg_font_lucasfont_alternater");
extern const ucg_fntpgm_uint8_t ucg_font_m2icon_5[] UCG_FONT_SECTION("ucg_font_m2icon_5");
extern const ucg_fntpgm_uint8_t ucg_font_m2icon_7[] UCG_FONT_SECTION("ucg_font_m2icon_7");
extern const ucg_fntpgm_uint8_t ucg_font_m2icon_9[] UCG_FONT_SECTION("ucg_font_m2icon_9");
extern const ucg_fntpgm_uint8_t ucg_font_micro[] UCG_FONT_SECTION("ucg_font_micro");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB08[] UCG_FONT_SECTION("ucg_font_ncenB08");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB08r[] UCG_FONT_SECTION("ucg_font_ncenB08r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB10[] UCG_FONT_SECTION("ucg_font_ncenB10");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB10r[] UCG_FONT_SECTION("ucg_font_ncenB10r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB12[] UCG_FONT_SECTION("ucg_font_ncenB12");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB12r[] UCG_FONT_SECTION("ucg_font_ncenB12r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB14[] UCG_FONT_SECTION("ucg_font_ncenB14");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB14r[] UCG_FONT_SECTION("ucg_font_ncenB14r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB18[] UCG_FONT_SECTION("ucg_font_ncenB18");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB18r[] UCG_FONT_SECTION("ucg_font_ncenB18r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB24[] UCG_FONT_SECTION("ucg_font_ncenB24");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB24n[] UCG_FONT_SECTION("ucg_font_ncenB24n");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB24r[] UCG_FONT_SECTION("ucg_font_ncenB24r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR08[] UCG_FONT_SECTION("ucg_font_ncenR08");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR08r[] UCG_FONT_SECTION("ucg_font_ncenR08r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR10[] UCG_FONT_SECTION("ucg_font_ncenR10");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR10r[] UCG_FONT_SECTION("ucg_font_ncenR10r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR12[] UCG_FONT_SECTION("ucg_font_ncenR12");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR12r[] UCG_FONT_SECTION("ucg_font_ncenR12r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR14[] UCG_FONT_SECTION("ucg_font_ncenR14");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR14r[] UCG_FONT_SECTION("ucg_font_ncenR14r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR18[] UCG_FONT_SECTION("ucg_font_ncenR18");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR18r[] UCG_FONT_SECTION("ucg_font_ncenR18r");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR24[] UCG_FONT_SECTION("ucg_font_ncenR24");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR24n[] UCG_FONT_SECTION("ucg_font_ncenR24n");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR24r[] UCG_FONT_SECTION("ucg_font_ncenR24r");
extern const ucg_fntpgm_uint8_t ucg_font_orgv01[] UCG_FONT_SECTION("ucg_font_orgv01");
extern const ucg_fntpgm_uint8_t ucg_font_orgv01n[] UCG_FONT_SECTION("ucg_font_orgv01n");
extern const ucg_fntpgm_uint8_t ucg_font_orgv01r[] UCG_FONT_SECTION("ucg_font_orgv01r");
extern const ucg_fntpgm_uint8_t ucg_font_p01type[] UCG_FONT_SECTION("ucg_font_p01type");
extern const ucg_fntpgm_uint8_t ucg_font_p01typen[] UCG_FONT_SECTION("ucg_font_p01typen");
extern const ucg_fntpgm_uint8_t ucg_font_p01typer[] UCG_FONT_SECTION("ucg_font_p01typer");
extern const ucg_fntpgm_uint8_t ucg_font_pixelle_micro[] UCG_FONT_SECTION("ucg_font_pixelle_micro");
extern const ucg_fntpgm_uint8_t ucg_font_pixelle_micron[] UCG_FONT_SECTION("ucg_font_pixelle_micron");
extern const ucg_fntpgm_uint8_t ucg_font_pixelle_micror[] UCG_FONT_SECTION("ucg_font_pixelle_micror");
extern const ucg_fntpgm_uint8_t ucg_font_profont10[] UCG_FONT_SECTION("ucg_font_profont10");
extern const ucg_fntpgm_uint8_t ucg_font_profont10r[] UCG_FONT_SECTION("ucg_font_profont10r");
extern const ucg_fntpgm_uint8_t ucg_font_profont11[] UCG_FONT_SECTION("ucg_font_profont11");
extern const ucg_fntpgm_uint8_t ucg_font_profont11r[] UCG_FONT_SECTION("ucg_font_profont11r");
extern const ucg_fntpgm_uint8_t ucg_font_profont12[] UCG_FONT_SECTION("ucg_font_profont12");
extern const ucg_fntpgm_uint8_t ucg_font_profont12r[] UCG_FONT_SECTION("ucg_font_profont12r");
extern const ucg_fntpgm_uint8_t ucg_font_profont15[] UCG_FONT_SECTION("ucg_font_profont15");
extern const ucg_fntpgm_uint8_t ucg_font_profont15r[] UCG_FONT_SECTION("ucg_font_profont15r");
extern const ucg_fntpgm_uint8_t ucg_font_profont17[] UCG_FONT_SECTION("ucg_font_profont17");
extern const ucg_fntpgm_uint8_t ucg_font_profont17r[] UCG_FONT_SECTION("ucg_font_profont17r");
extern const ucg_fntpgm_uint8_t ucg_font_profont22[] UCG_FONT_SECTION("ucg_font_profont22");
extern const ucg_fntpgm_uint8_t ucg_font_profont22n[] UCG_FONT_SECTION("ucg_font_profont22n");
extern const ucg_fntpgm_uint8_t ucg_font_profont22r[] UCG_FONT_SECTION("ucg_font_profont22r");
extern const ucg_fntpgm_uint8_t ucg_font_profont29[] UCG_FONT_SECTION("ucg_font_profont29");
extern const ucg_fntpgm_uint8_t ucg_font_profont29n[] UCG_FONT_SECTION("ucg_font_profont29n");
extern const ucg_fntpgm_uint8_t ucg_font_profont29r[] UCG_FONT_SECTION("ucg_font_profont29r");
extern const ucg_fntpgm_uint8_t ucg_font_robot_de_niro[] UCG_FONT_SECTION("ucg_font_robot_de_niro");
extern const ucg_fntpgm_uint8_t ucg_font_robot_de_niron[] UCG_FONT_SECTION("ucg_font_robot_de_niron");
extern const ucg_fntpgm_uint8_t ucg_font_robot_de_niror[] UCG_FONT_SECTION("ucg_font_robot_de_niror");
extern const ucg_fntpgm_uint8_t ucg_font_symb08[] UCG_FONT_SECTION("ucg_font_symb08");
extern const ucg_fntpgm_uint8_t ucg_font_symb08r[] UCG_FONT_SECTION("ucg_font_symb08r");
extern const ucg_fntpgm_uint8_t ucg_font_symb10[] UCG_FONT_SECTION("ucg_font_symb10");
extern const ucg_fntpgm_uint8_t ucg_font_symb10r[] UCG_FONT_SECTION("ucg_font_symb10r");
extern const ucg_fntpgm_uint8_t ucg_font_symb12[] UCG_FONT_SECTION("ucg_font_symb12");
extern const ucg_fntpgm_uint8_t ucg_font_symb12r[] UCG_FONT_SECTION("ucg_font_symb12r");
extern const ucg_fntpgm_uint8_t ucg_font_symb14[] UCG_FONT_SECTION("ucg_font_symb14");
extern const ucg_fntpgm_uint8_t ucg_font_symb14r[] UCG_FONT_SECTION("ucg_font_symb14r");
extern const ucg_fntpgm_uint8_t ucg_font_symb18[] UCG_FONT_SECTION("ucg_font_symb18");
extern const ucg_fntpgm_uint8_t ucg_font_symb18r[] UCG_FONT_SECTION("ucg_font_symb18r");
extern const ucg_fntpgm_uint8_t ucg_font_symb24[] UCG_FONT_SECTION("ucg_font_symb24");
extern const ucg_fntpgm_uint8_t ucg_font_symb24r[] UCG_FONT_SECTION("ucg_font_symb24r");
extern const ucg_fntpgm_uint8_t ucg_font_timB08[] UCG_FONT_SECTION("ucg_font_timB08");
extern const ucg_fntpgm_uint8_t ucg_font_timB08r[] UCG_FONT_SECTION("ucg_font_timB08r");
extern const ucg_fntpgm_uint8_t ucg_font_timB10[] UCG_FONT_SECTION("ucg_font_timB10");
extern const ucg_fntpgm_uint8_t ucg_font_timB10r[] UCG_FONT_SECTION("ucg_font_timB10r");
extern const ucg_fntpgm_uint8_t ucg_font_timB12[] UCG_FONT_SECTION("ucg_font_timB12");
extern const ucg_fntpgm_uint8_t ucg_font_timB12r[] UCG_FONT_SECTION("ucg_font_timB12r");
extern const ucg_fntpgm_uint8_t ucg_font_timB14[] UCG_FONT_SECTION("ucg_font_timB14");
extern const ucg_fntpgm_uint8_t ucg_font_timB14r[] UCG_FONT_SECTION("ucg_font_timB14r");
extern const ucg_fntpgm_uint8_t ucg_font_timB18[] UCG_FONT_SECTION("ucg_font_timB18");
extern const ucg_fntpgm_uint8_t ucg_font_timB18r[] UCG_FONT_SECTION("ucg_font_timB18r");
extern const ucg_fntpgm_uint8_t ucg_font_timB24[] UCG_FONT_SECTION("ucg_font_timB24");
extern const ucg_fntpgm_uint8_t ucg_font_timB24n[] UCG_FONT_SECTION("ucg_font_timB24n");
extern const ucg_fntpgm_uint8_t ucg_font_timB24r[] UCG_FONT_SECTION("ucg_font_timB24r");
extern const ucg_fntpgm_uint8_t ucg_font_timR08[] UCG_FONT_SECTION("ucg_font_timR08");
extern const ucg_fntpgm_uint8_t ucg_font_timR08r[] UCG_FONT_SECTION("ucg_font_timR08r");
extern const ucg_fntpgm_uint8_t ucg_font_timR10[] UCG_FONT_SECTION("ucg_font_timR10");
extern const ucg_fntpgm_uint8_t ucg_font_timR10r[] UCG_FONT_SECTION("ucg_font_timR10r");
extern const ucg_fntpgm_uint8_t ucg_font_timR12[] UCG_FONT_SECTION("ucg_font_timR12");
extern const ucg_fntpgm_uint8_t ucg_font_timR12r[] UCG_FONT_SECTION("ucg_font_timR12r");
extern const ucg_fntpgm_uint8_t ucg_font_timR14[] UCG_FONT_SECTION("ucg_font_timR14");
extern const ucg_fntpgm_uint8_t ucg_font_timR14r[] UCG_FONT_SECTION("ucg_font_timR14r");
extern const ucg_fntpgm_uint8_t ucg_font_timR18[] UCG_FONT_SECTION("ucg_font_timR18");
extern const ucg_fntpgm_uint8_t ucg_font_timR18r[] UCG_FONT_SECTION("ucg_font_timR18r");
extern const ucg_fntpgm_uint8_t ucg_font_timR24[] UCG_FONT_SECTION("ucg_font_timR24");
extern const ucg_fntpgm_uint8_t ucg_font_timR24n[] UCG_FONT_SECTION("ucg_font_timR24n");
extern const ucg_fntpgm_uint8_t ucg_font_timR24r[] UCG_FONT_SECTION("ucg_font_timR24r");
extern const ucg_fntpgm_uint8_t ucg_font_tpssb[] UCG_FONT_SECTION("ucg_font_tpssb");
extern const ucg_fntpgm_uint8_t ucg_font_tpssbn[] UCG_FONT_SECTION("ucg_font_tpssbn");
extern const ucg_fntpgm_uint8_t ucg_font_tpssbr[] UCG_FONT_SECTION("ucg_font_tpssbr");
extern const ucg_fntpgm_uint8_t ucg_font_tpss[] UCG_FONT_SECTION("ucg_font_tpss");
extern const ucg_fntpgm_uint8_t ucg_font_tpssn[] UCG_FONT_SECTION("ucg_font_tpssn");
extern const ucg_fntpgm_uint8_t ucg_font_tpssr[] UCG_FONT_SECTION("ucg_font_tpssr");
extern const ucg_fntpgm_uint8_t ucg_font_trixel_square[] UCG_FONT_SECTION("ucg_font_trixel_square");
extern const ucg_fntpgm_uint8_t ucg_font_trixel_squaren[] UCG_FONT_SECTION("ucg_font_trixel_squaren");
extern const ucg_fntpgm_uint8_t ucg_font_trixel_squarer[] UCG_FONT_SECTION("ucg_font_trixel_squarer");
extern const ucg_fntpgm_uint8_t ucg_font_u8glib_4[] UCG_FONT_SECTION("ucg_font_u8glib_4");
extern const ucg_fntpgm_uint8_t ucg_font_u8glib_4r[] UCG_FONT_SECTION("ucg_font_u8glib_4r");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_0_8[] UCG_FONT_SECTION("ucg_font_unifont_0_8");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_12_13[] UCG_FONT_SECTION("ucg_font_unifont_12_13");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_18_19[] UCG_FONT_SECTION("ucg_font_unifont_18_19");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_2_3[] UCG_FONT_SECTION("ucg_font_unifont_2_3");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_4_5[] UCG_FONT_SECTION("ucg_font_unifont_4_5");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_67_75[] UCG_FONT_SECTION("ucg_font_unifont_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_72_73[] UCG_FONT_SECTION("ucg_font_unifont_72_73");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_75r[] UCG_FONT_SECTION("ucg_font_unifont_75r");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_76[] UCG_FONT_SECTION("ucg_font_unifont_76");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_77[] UCG_FONT_SECTION("ucg_font_unifont_77");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_78_79[] UCG_FONT_SECTION("ucg_font_unifont_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_86[] UCG_FONT_SECTION("ucg_font_unifont_86");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_8_9[] UCG_FONT_SECTION("ucg_font_unifont_8_9");
extern const ucg_fntpgm_uint8_t ucg_font_unifont[] UCG_FONT_SECTION("ucg_font_unifont");
extern const ucg_fntpgm_uint8_t ucg_font_unifontr[] UCG_FONT_SECTION("ucg_font_unifontr");
extern const ucg_fntpgm_uint8_t ucg_font_fub11[] UCG_FONT_SECTION("ucg_font_fub11");
extern const ucg_fntpgm_uint8_t ucg_font_fub11n[] UCG_FONT_SECTION("ucg_font_fub11n");
extern const ucg_fntpgm_uint8_t ucg_font_fub11r[] UCG_FONT_SECTION("ucg_font_fub11r");
extern const ucg_fntpgm_uint8_t ucg_font_fub14[] UCG_FONT_SECTION("ucg_font_fub14");
extern const ucg_fntpgm_uint8_t ucg_font_fub14n[] UCG_FONT_SECTION("ucg_font_fub14n");
extern const ucg_fntpgm_uint8_t ucg_font_fub14r[] UCG_FONT_SECTION("ucg_font_fub14r");
extern const ucg_fntpgm_uint8_t ucg_font_fub17[] UCG_FONT_SECTION("ucg_font_fub17");
extern const ucg_fntpgm_uint8_t ucg_font_fub17n[] UCG_FONT_SECTION("ucg_font_fub17n");
extern const ucg_fntpgm_uint8_t ucg_font_fub17r[] UCG_FONT_SECTION("ucg_font_fub17r");
extern const ucg_fntpgm_uint8_t ucg_font_fub20[] UCG_FONT_SECTION("ucg_font_fub20");
extern const ucg_fntpgm_uint8_t ucg_font_fub20n[] UCG_FONT_SECTION("ucg_font_fub20n");
extern const ucg_fntpgm_uint8_t ucg_font_fub20r[] UCG_FONT_SECTION("ucg_font_fub20r");
extern const ucg_fntpgm_uint8_t ucg_font_fub25[] UCG_FONT_SECTION("ucg_font_fub25");
extern const ucg_fntpgm_uint8_t ucg_font_fub25n[] UCG_FONT_SECTION("ucg_font_fub25n");
extern const ucg_fntpgm_uint8_t ucg_font_fub25r[] UCG_FONT_SECTION("ucg_font_fub25r");
extern const ucg_fntpgm_uint8_t ucg_font_fub30[] UCG_FONT_SECTION("ucg_font_fub30");
extern const ucg_fntpgm_uint8_t ucg_font_fub30n[] UCG_FONT_SECTION("ucg_font_fub30n");
extern const ucg_fntpgm_uint8_t ucg_font_fub30r[] UCG_FONT_SECTION("ucg_font_fub30r");
extern const ucg_fntpgm_uint8_t ucg_font_fub35n[] UCG_FONT_SECTION("ucg_font_fub35n");
extern const ucg_fntpgm_uint8_t ucg_font_fub42n[] UCG_FONT_SECTION("ucg_font_fub42n");
extern const ucg_fntpgm_uint8_t ucg_font_fub49n[] UCG_FONT_SECTION("ucg_font_fub49n");
extern const ucg_fntpgm_uint8_t ucg_font_fur11[] UCG_FONT_SECTION("ucg_font_fur11");
extern const ucg_fntpgm_uint8_t ucg_font_fur11n[] UCG_FONT_SECTION("ucg_font_fur11n");
extern const ucg_fntpgm_uint8_t ucg_font_fur11r[] UCG_FONT_SECTION("ucg_font_fur11r");
extern const ucg_fntpgm_uint8_t ucg_font_fur14[] UCG_FONT_SECTION("ucg_font_fur14");
extern const ucg_fntpgm_uint8_t ucg_font_fur14n[] UCG_FONT_SECTION("ucg_font_fur14n");
extern const ucg_fntpgm_uint8_t ucg_font_fur14r[] UCG_FONT_SECTION("ucg_font_fur14r");
extern const ucg_fntpgm_uint8_t ucg_font_fur17[] UCG_FONT_SECTION("ucg_font_fur17");
extern const ucg_fntpgm_uint8_t ucg_font_fur17n[] UCG_FONT_SECTION("ucg_font_fur17n");
extern const ucg_fntpgm_uint8_t ucg_font_fur17r[] UCG_FONT_SECTION("ucg_font_fur17r");
extern const ucg_fntpgm_uint8_t ucg_font_fur20[] UCG_FONT_SECTION("ucg_font_fur20");
extern const ucg_fntpgm_uint8_t ucg_font_fur20n[] UCG_FONT_SECTION("ucg_font_fur20n");
extern const ucg_fntpgm_uint8_t ucg_font_fur20r[] UCG_FONT_SECTION("ucg_font_fur20r");
extern const ucg_fntpgm_uint8_t ucg_font_fur25[] UCG_FONT_SECTION("ucg_font_fur25");
extern const ucg_fntpgm_uint8_t ucg_font_fur25n[] UCG_FONT_SECTION("ucg_font_fur25n");
extern const ucg_fntpgm_uint8_t ucg_font_fur25r[] UCG_FONT_SECTION("ucg_font_fur25r");
extern const ucg_fntpgm_uint8_t ucg_font_fur30[] UCG_FONT_SECTION("ucg_font_fur30");
extern const ucg_fntpgm_uint8_t ucg_font_fur30n[] UCG_FONT_SECTION("ucg_font_fur30n");
extern const ucg_fntpgm_uint8_t ucg_font_fur30r[] UCG_FONT_SECTION("ucg_font_fur30r");
extern const ucg_fntpgm_uint8_t ucg_font_fur35n[] UCG_FONT_SECTION("ucg_font_fur35n");
extern const ucg_fntpgm_uint8_t ucg_font_fur42n[] UCG_FONT_SECTION("ucg_font_fur42n");
extern const ucg_fntpgm_uint8_t ucg_font_fur49n[] UCG_FONT_SECTION("ucg_font_fur49n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso16[] UCG_FONT_SECTION("ucg_font_logisoso16");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso16n[] UCG_FONT_SECTION("ucg_font_logisoso16n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso16r[] UCG_FONT_SECTION("ucg_font_logisoso16r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso18[] UCG_FONT_SECTION("ucg_font_logisoso18");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso18n[] UCG_FONT_SECTION("ucg_font_logisoso18n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso18r[] UCG_FONT_SECTION("ucg_font_logisoso18r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso20[] UCG_FONT_SECTION("ucg_font_logisoso20");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso20n[] UCG_FONT_SECTION("ucg_font_logisoso20n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso20r[] UCG_FONT_SECTION("ucg_font_logisoso20r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso22[] UCG_FONT_SECTION("ucg_font_logisoso22");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso22n[] UCG_FONT_SECTION("ucg_font_logisoso22n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso22r[] UCG_FONT_SECTION("ucg_font_logisoso22r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso24[] UCG_FONT_SECTION("ucg_font_logisoso24");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso24n[] UCG_FONT_SECTION("ucg_font_logisoso24n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso24r[] UCG_FONT_SECTION("ucg_font_logisoso24r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso26[] UCG_FONT_SECTION("ucg_font_logisoso26");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso26n[] UCG_FONT_SECTION("ucg_font_logisoso26n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso26r[] UCG_FONT_SECTION("ucg_font_logisoso26r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso28[] UCG_FONT_SECTION("ucg_font_logisoso28");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso28n[] UCG_FONT_SECTION("ucg_font_logisoso28n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso28r[] UCG_FONT_SECTION("ucg_font_logisoso28r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso30[] UCG_FONT_SECTION("ucg_font_logisoso30");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso30n[] UCG_FONT_SECTION("ucg_font_logisoso30n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso30r[] UCG_FONT_SECTION("ucg_font_logisoso30r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso32[] UCG_FONT_SECTION("ucg_font_logisoso32");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso32n[] UCG_FONT_SECTION("ucg_font_logisoso32n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso32r[] UCG_FONT_SECTION("ucg_font_logisoso32r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso34[] UCG_FONT_SECTION("ucg_font_logisoso34");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso34n[] UCG_FONT_SECTION("ucg_font_logisoso34n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso34r[] UCG_FONT_SECTION("ucg_font_logisoso34r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso38[] UCG_FONT_SECTION("ucg_font_logisoso38");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso38n[] UCG_FONT_SECTION("ucg_font_logisoso38n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso38r[] UCG_FONT_SECTION("ucg_font_logisoso38r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso42[] UCG_FONT_SECTION("ucg_font_logisoso42");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso42n[] UCG_FONT_SECTION("ucg_font_logisoso42n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso42r[] UCG_FONT_SECTION("ucg_font_logisoso42r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso46n[] UCG_FONT_SECTION("ucg_font_logisoso46n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso46r[] UCG_FONT_SECTION("ucg_font_logisoso46r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso50n[] UCG_FONT_SECTION("ucg_font_logisoso50n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso50r[] UCG_FONT_SECTION("ucg_font_logisoso50r");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso54n[] UCG_FONT_SECTION("ucg_font_logisoso54n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso58n[] UCG_FONT_SECTION("ucg_font_logisoso58n");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso62n[] UCG_FONT_SECTION("ucg_font_logisoso62n");
extern const ucg_fntpgm_uint8_t ucg_font_osb18[] UCG_FONT_SECTION("ucg_font_osb18");
extern const ucg_fntpgm_uint8_t ucg_font_osb18n[] UCG_FONT_SECTION("ucg_font_osb18n");
extern const ucg_fntpgm_uint8_t ucg_font_osb18r[] UCG_FONT_SECTION("ucg_font_osb18r");
extern const ucg_fntpgm_uint8_t ucg_font_osb21[] UCG_FONT_SECTION("ucg_font_osb21");
extern const ucg_fntpgm_uint8_t ucg_font_osb21n[] UCG_FONT_SECTION("ucg_font_osb21n");
extern const ucg_fntpgm_uint8_t ucg_font_osb21r[] UCG_FONT_SECTION("ucg_font_osb21r");
extern const ucg_fntpgm_uint8_t ucg_font_osb26[] UCG_FONT_SECTION("ucg_font_osb26");
extern const ucg_fntpgm_uint8_t ucg_font_osb26n[] UCG_FONT_SECTION("ucg_font_osb26n");
extern const ucg_fntpgm_uint8_t ucg_font_osb26r[] UCG_FONT_SECTION("ucg_font_osb26r");
extern const ucg_fntpgm_uint8_t ucg_font_osb29[] UCG_FONT_SECTION("ucg_font_osb29");
extern const ucg_fntpgm_uint8_t ucg_font_osb29n[] UCG_FONT_SECTION("ucg_font_osb29n");
extern const ucg_fntpgm_uint8_t ucg_font_osb29r[] UCG_FONT_SECTION("ucg_font_osb29r");
extern const ucg_fntpgm_uint8_t ucg_font_osb35[] UCG_FONT_SECTION("ucg_font_osb35");
extern const ucg_fntpgm_uint8_t ucg_font_osb35n[] UCG_FONT_SECTION("ucg_font_osb35n");
extern const ucg_fntpgm_uint8_t ucg_font_osb35r[] UCG_FONT_SECTION("ucg_font_osb35r");
extern const ucg_fntpgm_uint8_t ucg_font_osr18[] UCG_FONT_SECTION("ucg_font_osr18");
extern const ucg_fntpgm_uint8_t ucg_font_osr18n[] UCG_FONT_SECTION("ucg_font_osr18n");
extern const ucg_fntpgm_uint8_t ucg_font_osr18r[] UCG_FONT_SECTION("ucg_font_osr18r");
extern const ucg_fntpgm_uint8_t ucg_font_osr21[] UCG_FONT_SECTION("ucg_font_osr21");
extern const ucg_fntpgm_uint8_t ucg_font_osr21n[] UCG_FONT_SECTION("ucg_font_osr21n");
extern const ucg_fntpgm_uint8_t ucg_font_osr21r[] UCG_FONT_SECTION("ucg_font_osr21r");
extern const ucg_fntpgm_uint8_t ucg_font_osr26[] UCG_FONT_SECTION("ucg_font_osr26");
extern const ucg_fntpgm_uint8_t ucg_font_osr26n[] UCG_FONT_SECTION("ucg_font_osr26n");
extern const ucg_fntpgm_uint8_t ucg_font_osr26r[] UCG_FONT_SECTION("ucg_font_osr26r");
extern const ucg_fntpgm_uint8_t ucg_font_osr29[] UCG_FONT_SECTION("ucg_font_osr29");
extern const ucg_fntpgm_uint8_t ucg_font_osr29n[] UCG_FONT_SECTION("ucg_font_osr29n");
extern const ucg_fntpgm_uint8_t ucg_font_osr29r[] UCG_FONT_SECTION("ucg_font_osr29r");
extern const ucg_fntpgm_uint8_t ucg_font_osr35[] UCG_FONT_SECTION("ucg_font_osr35");
extern const ucg_fntpgm_uint8_t ucg_font_osr35n[] UCG_FONT_SECTION("ucg_font_osr35n");
extern const ucg_fntpgm_uint8_t ucg_font_osr35r[] UCG_FONT_SECTION("ucg_font_osr35r");
#else
extern const ucg_fntpgm_uint8_t ucg_font_04b_03b_hf[] UCG_FONT_SECTION("ucg_font_04b_03b_hf");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03b_hn[] UCG_FONT_SECTION("ucg_font_04b_03b_hn");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03b_hr[] UCG_FONT_SECTION("ucg_font_04b_03b_hr");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03b_tf[] UCG_FONT_SECTION("ucg_font_04b_03b_tf");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03b_tn[] UCG_FONT_SECTION("ucg_font_04b_03b_tn");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03b_tr[] UCG_FONT_SECTION("ucg_font_04b_03b_tr");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03_hf[] UCG_FONT_SECTION("ucg_font_04b_03_hf");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03_hn[] UCG_FONT_SECTION("ucg_font_04b_03_hn");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03_hr[] UCG_FONT_SECTION("ucg_font_04b_03_hr");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03_tf[] UCG_FONT_SECTION("ucg_font_04b_03_tf");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03_tn[] UCG_FONT_SECTION("ucg_font_04b_03_tn");
extern const ucg_fntpgm_uint8_t ucg_font_04b_03_tr[] UCG_FONT_SECTION("ucg_font_04b_03_tr");
extern const ucg_fntpgm_uint8_t ucg_font_04b_24_hf[] UCG_FONT_SECTION("ucg_font_04b_24_hf");
extern const ucg_fntpgm_uint8_t ucg_font_04b_24_hn[] UCG_FONT_SECTION("ucg_font_04b_24_hn");
extern const ucg_fntpgm_uint8_t ucg_font_04b_24_hr[] UCG_FONT_SECTION("ucg_font_04b_24_hr");
extern const ucg_fntpgm_uint8_t ucg_font_04b_24_tf[] UCG_FONT_SECTION("ucg_font_04b_24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_04b_24_tn[] UCG_FONT_SECTION("ucg_font_04b_24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_04b_24_tr[] UCG_FONT_SECTION("ucg_font_04b_24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_10x20_67_75[] UCG_FONT_SECTION("ucg_font_10x20_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_10x20_78_79[] UCG_FONT_SECTION("ucg_font_10x20_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_10x20_mf[] UCG_FONT_SECTION("ucg_font_10x20_mf");
extern const ucg_fntpgm_uint8_t ucg_font_10x20_mr[] UCG_FONT_SECTION("ucg_font_10x20_mr");
extern const ucg_fntpgm_uint8_t ucg_font_10x20_tf[] UCG_FONT_SECTION("ucg_font_10x20_tf");
extern const ucg_fntpgm_uint8_t ucg_font_10x20_tr[] UCG_FONT_SECTION("ucg_font_10x20_tr");
extern const ucg_fntpgm_uint8_t ucg_font_4x6_mf[] UCG_FONT_SECTION("ucg_font_4x6_mf");
extern const ucg_fntpgm_uint8_t ucg_font_4x6_mr[] UCG_FONT_SECTION("ucg_font_4x6_mr");
extern const ucg_fntpgm_uint8_t ucg_font_4x6_tf[] UCG_FONT_SECTION("ucg_font_4x6_tf");
extern const ucg_fntpgm_uint8_t ucg_font_4x6_tr[] UCG_FONT_SECTION("ucg_font_4x6_tr");
extern const ucg_fntpgm_uint8_t ucg_font_5x7_8f[] UCG_FONT_SECTION("ucg_font_5x7_8f");
extern const ucg_fntpgm_uint8_t ucg_font_5x7_8r[] UCG_FONT_SECTION("ucg_font_5x7_8r");
extern const ucg_fntpgm_uint8_t ucg_font_5x7_mf[] UCG_FONT_SECTION("ucg_font_5x7_mf");
extern const ucg_fntpgm_uint8_t ucg_font_5x7_mr[] UCG_FONT_SECTION("ucg_font_5x7_mr");
extern const ucg_fntpgm_uint8_t ucg_font_5x7_tf[] UCG_FONT_SECTION("ucg_font_5x7_tf");
extern const ucg_fntpgm_uint8_t ucg_font_5x7_tr[] UCG_FONT_SECTION("ucg_font_5x7_tr");
extern const ucg_fntpgm_uint8_t ucg_font_5x8_8f[] UCG_FONT_SECTION("ucg_font_5x8_8f");
extern const ucg_fntpgm_uint8_t ucg_font_5x8_8r[] UCG_FONT_SECTION("ucg_font_5x8_8r");
extern const ucg_fntpgm_uint8_t ucg_font_5x8_mf[] UCG_FONT_SECTION("ucg_font_5x8_mf");
extern const ucg_fntpgm_uint8_t ucg_font_5x8_mr[] UCG_FONT_SECTION("ucg_font_5x8_mr");
extern const ucg_fntpgm_uint8_t ucg_font_5x8_tf[] UCG_FONT_SECTION("ucg_font_5x8_tf");
extern const ucg_fntpgm_uint8_t ucg_font_5x8_tr[] UCG_FONT_SECTION("ucg_font_5x8_tr");
extern const ucg_fntpgm_uint8_t ucg_font_6x10_mf[] UCG_FONT_SECTION("ucg_font_6x10_mf");
extern const ucg_fntpgm_uint8_t ucg_font_6x10_mr[] UCG_FONT_SECTION("ucg_font_6x10_mr");
extern const ucg_fntpgm_uint8_t ucg_font_6x10_tf[] UCG_FONT_SECTION("ucg_font_6x10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_6x10_tr[] UCG_FONT_SECTION("ucg_font_6x10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_67_75[] UCG_FONT_SECTION("ucg_font_6x12_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_75[] UCG_FONT_SECTION("ucg_font_6x12_75");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_78_79[] UCG_FONT_SECTION("ucg_font_6x12_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_mf[] UCG_FONT_SECTION("ucg_font_6x12_mf");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_mr[] UCG_FONT_SECTION("ucg_font_6x12_mr");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_tf[] UCG_FONT_SECTION("ucg_font_6x12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_6x12_tr[] UCG_FONT_SECTION("ucg_font_6x12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_6x13_67_75[] UCG_FONT_SECTION("ucg_font_6x13_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_6x13_78_79[] UCG_FONT_SECTION("ucg_font_6x13_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_6x13B_tf[] UCG_FONT_SECTION("ucg_font_6x13B_tf");
extern const ucg_fntpgm_uint8_t ucg_font_6x13B_tr[] UCG_FONT_SECTION("ucg_font_6x13B_tr");
extern const ucg_fntpgm_uint8_t ucg_font_6x13_mf[] UCG_FONT_SECTION("ucg_font_6x13_mf");
extern const ucg_fntpgm_uint8_t ucg_font_6x13_mr[] UCG_FONT_SECTION("ucg_font_6x13_mr");
extern const ucg_fntpgm_uint8_t ucg_font_6x13O_tf[] UCG_FONT_SECTION("ucg_font_6x13O_tf");
extern const ucg_fntpgm_uint8_t ucg_font_6x13O_tr[] UCG_FONT_SECTION("ucg_font_6x13O_tr");
extern const ucg_fntpgm_uint8_t ucg_font_6x13_tf[] UCG_FONT_SECTION("ucg_font_6x13_tf");
extern const ucg_fntpgm_uint8_t ucg_font_6x13_tr[] UCG_FONT_SECTION("ucg_font_6x13_tr");
extern const ucg_fntpgm_uint8_t ucg_font_7x13_67_75[] UCG_FONT_SECTION("ucg_font_7x13_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_7x13_78_79[] UCG_FONT_SECTION("ucg_font_7x13_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_7x13B_tf[] UCG_FONT_SECTION("ucg_font_7x13B_tf");
extern const ucg_fntpgm_uint8_t ucg_font_7x13B_tr[] UCG_FONT_SECTION("ucg_font_7x13B_tr");
extern const ucg_fntpgm_uint8_t ucg_font_7x13_mf[] UCG_FONT_SECTION("ucg_font_7x13_mf");
extern const ucg_fntpgm_uint8_t ucg_font_7x13_mr[] UCG_FONT_SECTION("ucg_font_7x13_mr");
extern const ucg_fntpgm_uint8_t ucg_font_7x13O_tf[] UCG_FONT_SECTION("ucg_font_7x13O_tf");
extern const ucg_fntpgm_uint8_t ucg_font_7x13O_tr[] UCG_FONT_SECTION("ucg_font_7x13O_tr");
extern const ucg_fntpgm_uint8_t ucg_font_7x13_tf[] UCG_FONT_SECTION("ucg_font_7x13_tf");
extern const ucg_fntpgm_uint8_t ucg_font_7x13_tr[] UCG_FONT_SECTION("ucg_font_7x13_tr");
extern const ucg_fntpgm_uint8_t ucg_font_7x14B_mf[] UCG_FONT_SECTION("ucg_font_7x14B_mf");
extern const ucg_fntpgm_uint8_t ucg_font_7x14B_mr[] UCG_FONT_SECTION("ucg_font_7x14B_mr");
extern const ucg_fntpgm_uint8_t ucg_font_7x14B_tf[] UCG_FONT_SECTION("ucg_font_7x14B_tf");
extern const ucg_fntpgm_uint8_t ucg_font_7x14B_tr[] UCG_FONT_SECTION("ucg_font_7x14B_tr");
extern const ucg_fntpgm_uint8_t ucg_font_7x14_mf[] UCG_FONT_SECTION("ucg_font_7x14_mf");
extern const ucg_fntpgm_uint8_t ucg_font_7x14_mr[] UCG_FONT_SECTION("ucg_font_7x14_mr");
extern const ucg_fntpgm_uint8_t ucg_font_7x14_tf[] UCG_FONT_SECTION("ucg_font_7x14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_7x14_tr[] UCG_FONT_SECTION("ucg_font_7x14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_8x13_67_75[] UCG_FONT_SECTION("ucg_font_8x13_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_8x13B_mf[] UCG_FONT_SECTION("ucg_font_8x13B_mf");
extern const ucg_fntpgm_uint8_t ucg_font_8x13B_mr[] UCG_FONT_SECTION("ucg_font_8x13B_mr");
extern const ucg_fntpgm_uint8_t ucg_font_8x13B_tf[] UCG_FONT_SECTION("ucg_font_8x13B_tf");
extern const ucg_fntpgm_uint8_t ucg_font_8x13B_tr[] UCG_FONT_SECTION("ucg_font_8x13B_tr");
extern const ucg_fntpgm_uint8_t ucg_font_8x13_mf[] UCG_FONT_SECTION("ucg_font_8x13_mf");
extern const ucg_fntpgm_uint8_t ucg_font_8x13_mr[] UCG_FONT_SECTION("ucg_font_8x13_mr");
extern const ucg_fntpgm_uint8_t ucg_font_8x13O_mf[] UCG_FONT_SECTION("ucg_font_8x13O_mf");
extern const ucg_fntpgm_uint8_t ucg_font_8x13O_mr[] UCG_FONT_SECTION("ucg_font_8x13O_mr");
extern const ucg_fntpgm_uint8_t ucg_font_8x13O_tf[] UCG_FONT_SECTION("ucg_font_8x13O_tf");
extern const ucg_fntpgm_uint8_t ucg_font_8x13O_tr[] UCG_FONT_SECTION("ucg_font_8x13O_tr");
extern const ucg_fntpgm_uint8_t ucg_font_8x13_tf[] UCG_FONT_SECTION("ucg_font_8x13_tf");
extern const ucg_fntpgm_uint8_t ucg_font_8x13_tr[] UCG_FONT_SECTION("ucg_font_8x13_tr");
extern const ucg_fntpgm_uint8_t ucg_font_9x15_67_75[] UCG_FONT_SECTION("ucg_font_9x15_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_9x15_78_79[] UCG_FONT_SECTION("ucg_font_9x15_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_9x15B_mf[] UCG_FONT_SECTION("ucg_font_9x15B_mf");
extern const ucg_fntpgm_uint8_t ucg_font_9x15B_mr[] UCG_FONT_SECTION("ucg_font_9x15B_mr");
extern const ucg_fntpgm_uint8_t ucg_font_9x15B_tf[] UCG_FONT_SECTION("ucg_font_9x15B_tf");
extern const ucg_fntpgm_uint8_t ucg_font_9x15B_tr[] UCG_FONT_SECTION("ucg_font_9x15B_tr");
extern const ucg_fntpgm_uint8_t ucg_font_9x15_mf[] UCG_FONT_SECTION("ucg_font_9x15_mf");
extern const ucg_fntpgm_uint8_t ucg_font_9x15_mr[] UCG_FONT_SECTION("ucg_font_9x15_mr");
extern const ucg_fntpgm_uint8_t ucg_font_9x15_tf[] UCG_FONT_SECTION("ucg_font_9x15_tf");
extern const ucg_fntpgm_uint8_t ucg_font_9x15_tr[] UCG_FONT_SECTION("ucg_font_9x15_tr");
extern const ucg_fntpgm_uint8_t ucg_font_9x18_67_75[] UCG_FONT_SECTION("ucg_font_9x18_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_9x18_78_79[] UCG_FONT_SECTION("ucg_font_9x18_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_9x18B_mf[] UCG_FONT_SECTION("ucg_font_9x18B_mf");
extern const ucg_fntpgm_uint8_t ucg_font_9x18B_mr[] UCG_FONT_SECTION("ucg_font_9x18B_mr");
extern const ucg_fntpgm_uint8_t ucg_font_9x18B_tf[] UCG_FONT_SECTION("ucg_font_9x18B_tf");
extern const ucg_fntpgm_uint8_t ucg_font_9x18B_tr[] UCG_FONT_SECTION("ucg_font_9x18B_tr");
extern const ucg_fntpgm_uint8_t ucg_font_9x18_mf[] UCG_FONT_SECTION("ucg_font_9x18_mf");
extern const ucg_fntpgm_uint8_t ucg_font_9x18_mr[] UCG_FONT_SECTION("ucg_font_9x18_mr");
extern const ucg_fntpgm_uint8_t ucg_font_9x18_tf[] UCG_FONT_SECTION("ucg_font_9x18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_9x18_tr[] UCG_FONT_SECTION("ucg_font_9x18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_amstrad_cpc_8f[] UCG_FONT_SECTION("ucg_font_amstrad_cpc_8f");
extern const ucg_fntpgm_uint8_t ucg_font_amstrad_cpc_8r[] UCG_FONT_SECTION("ucg_font_amstrad_cpc_8r");
extern const ucg_fntpgm_uint8_t ucg_font_baby_hf[] UCG_FONT_SECTION("ucg_font_baby_hf");
extern const ucg_fntpgm_uint8_t ucg_font_baby_hn[] UCG_FONT_SECTION("ucg_font_baby_hn");
extern const ucg_fntpgm_uint8_t ucg_font_baby_hr[] UCG_FONT_SECTION("ucg_font_baby_hr");
extern const ucg_fntpgm_uint8_t ucg_font_baby_tf[] UCG_FONT_SECTION("ucg_font_baby_tf");
extern const ucg_fntpgm_uint8_t ucg_font_baby_tn[] UCG_FONT_SECTION("ucg_font_baby_tn");
extern const ucg_fntpgm_uint8_t ucg_font_baby_tr[] UCG_FONT_SECTION("ucg_font_baby_tr");
extern const ucg_fntpgm_uint8_t ucg_font_blipfest_07_hf[] UCG_FONT_SECTION("ucg_font_blipfest_07_hf");
extern const ucg_fntpgm_uint8_t ucg_font_blipfest_07_hn[] UCG_FONT_SECTION("ucg_font_blipfest_07_hn");
extern const ucg_fntpgm_uint8_t ucg_font_blipfest_07_hr[] UCG_FONT_SECTION("ucg_font_blipfest_07_hr");
extern const ucg_fntpgm_uint8_t ucg_font_blipfest_07_tf[] UCG_FONT_SECTION("ucg_font_blipfest_07_tf");
extern const ucg_fntpgm_uint8_t ucg_font_blipfest_07_tn[] UCG_FONT_SECTION("ucg_font_blipfest_07_tn");
extern const ucg_fntpgm_uint8_t ucg_font_blipfest_07_tr[] UCG_FONT_SECTION("ucg_font_blipfest_07_tr");
extern const ucg_fntpgm_uint8_t ucg_font_chikita_hf[] UCG_FONT_SECTION("ucg_font_chikita_hf");
extern const ucg_fntpgm_uint8_t ucg_font_chikita_hn[] UCG_FONT_SECTION("ucg_font_chikita_hn");
extern const ucg_fntpgm_uint8_t ucg_font_chikita_hr[] UCG_FONT_SECTION("ucg_font_chikita_hr");
extern const ucg_fntpgm_uint8_t ucg_font_chikita_tf[] UCG_FONT_SECTION("ucg_font_chikita_tf");
extern const ucg_fntpgm_uint8_t ucg_font_chikita_tn[] UCG_FONT_SECTION("ucg_font_chikita_tn");
extern const ucg_fntpgm_uint8_t ucg_font_chikita_tr[] UCG_FONT_SECTION("ucg_font_chikita_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courB08_mf[] UCG_FONT_SECTION("ucg_font_courB08_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courB08_mr[] UCG_FONT_SECTION("ucg_font_courB08_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courB08_tf[] UCG_FONT_SECTION("ucg_font_courB08_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courB08_tr[] UCG_FONT_SECTION("ucg_font_courB08_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courB10_mf[] UCG_FONT_SECTION("ucg_font_courB10_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courB10_mr[] UCG_FONT_SECTION("ucg_font_courB10_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courB10_tf[] UCG_FONT_SECTION("ucg_font_courB10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courB10_tr[] UCG_FONT_SECTION("ucg_font_courB10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courB12_mf[] UCG_FONT_SECTION("ucg_font_courB12_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courB12_mr[] UCG_FONT_SECTION("ucg_font_courB12_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courB12_tf[] UCG_FONT_SECTION("ucg_font_courB12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courB12_tr[] UCG_FONT_SECTION("ucg_font_courB12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courB14_mf[] UCG_FONT_SECTION("ucg_font_courB14_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courB14_mr[] UCG_FONT_SECTION("ucg_font_courB14_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courB14_tf[] UCG_FONT_SECTION("ucg_font_courB14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courB14_tr[] UCG_FONT_SECTION("ucg_font_courB14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courB18_mf[] UCG_FONT_SECTION("ucg_font_courB18_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courB18_mn[] UCG_FONT_SECTION("ucg_font_courB18_mn");
extern const ucg_fntpgm_uint8_t ucg_font_courB18_mr[] UCG_FONT_SECTION("ucg_font_courB18_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courB18_tf[] UCG_FONT_SECTION("ucg_font_courB18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courB18_tn[] UCG_FONT_SECTION("ucg_font_courB18_tn");
extern const ucg_fntpgm_uint8_t ucg_font_courB18_tr[] UCG_FONT_SECTION("ucg_font_courB18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courB24_mf[] UCG_FONT_SECTION("ucg_font_courB24_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courB24_mn[] UCG_FONT_SECTION("ucg_font_courB24_mn");
extern const ucg_fntpgm_uint8_t ucg_font_courB24_mr[] UCG_FONT_SECTION("ucg_font_courB24_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courB24_tf[] UCG_FONT_SECTION("ucg_font_courB24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courB24_tn[] UCG_FONT_SECTION("ucg_font_courB24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_courB24_tr[] UCG_FONT_SECTION("ucg_font_courB24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courR08_mf[] UCG_FONT_SECTION("ucg_font_courR08_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courR08_mr[] UCG_FONT_SECTION("ucg_font_courR08_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courR08_tf[] UCG_FONT_SECTION("ucg_font_courR08_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courR08_tr[] UCG_FONT_SECTION("ucg_font_courR08_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courR10_mf[] UCG_FONT_SECTION("ucg_font_courR10_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courR10_mr[] UCG_FONT_SECTION("ucg_font_courR10_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courR10_tf[] UCG_FONT_SECTION("ucg_font_courR10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courR10_tr[] UCG_FONT_SECTION("ucg_font_courR10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courR12_mf[] UCG_FONT_SECTION("ucg_font_courR12_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courR12_mr[] UCG_FONT_SECTION("ucg_font_courR12_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courR12_tf[] UCG_FONT_SECTION("ucg_font_courR12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courR12_tr[] UCG_FONT_SECTION("ucg_font_courR12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courR14_mf[] UCG_FONT_SECTION("ucg_font_courR14_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courR14_mr[] UCG_FONT_SECTION("ucg_font_courR14_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courR14_tf[] UCG_FONT_SECTION("ucg_font_courR14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courR14_tr[] UCG_FONT_SECTION("ucg_font_courR14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courR18_mf[] UCG_FONT_SECTION("ucg_font_courR18_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courR18_mr[] UCG_FONT_SECTION("ucg_font_courR18_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courR18_tf[] UCG_FONT_SECTION("ucg_font_courR18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courR18_tr[] UCG_FONT_SECTION("ucg_font_courR18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_courR24_mf[] UCG_FONT_SECTION("ucg_font_courR24_mf");
extern const ucg_fntpgm_uint8_t ucg_font_courR24_mn[] UCG_FONT_SECTION("ucg_font_courR24_mn");
extern const ucg_fntpgm_uint8_t ucg_font_courR24_mr[] UCG_FONT_SECTION("ucg_font_courR24_mr");
extern const ucg_fntpgm_uint8_t ucg_font_courR24_tf[] UCG_FONT_SECTION("ucg_font_courR24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_courR24_tn[] UCG_FONT_SECTION("ucg_font_courR24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_courR24_tr[] UCG_FONT_SECTION("ucg_font_courR24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_cu12_67_75[] UCG_FONT_SECTION("ucg_font_cu12_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_cu12_75[] UCG_FONT_SECTION("ucg_font_cu12_75");
extern const ucg_fntpgm_uint8_t ucg_font_cu12_hf[] UCG_FONT_SECTION("ucg_font_cu12_hf");
extern const ucg_fntpgm_uint8_t ucg_font_cu12_mf[] UCG_FONT_SECTION("ucg_font_cu12_mf");
extern const ucg_fntpgm_uint8_t ucg_font_cu12_tf[] UCG_FONT_SECTION("ucg_font_cu12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_cursor_tf[] UCG_FONT_SECTION("ucg_font_cursor_tf");
extern const ucg_fntpgm_uint8_t ucg_font_cursor_tr[] UCG_FONT_SECTION("ucg_font_cursor_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0_hf[] UCG_FONT_SECTION("ucg_font_fixed_v0_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0_hn[] UCG_FONT_SECTION("ucg_font_fixed_v0_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0_hr[] UCG_FONT_SECTION("ucg_font_fixed_v0_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0_mr[] UCG_FONT_SECTION("ucg_font_fixed_v0_mr");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0_tf[] UCG_FONT_SECTION("ucg_font_fixed_v0_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0_tn[] UCG_FONT_SECTION("ucg_font_fixed_v0_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fixed_v0_tr[] UCG_FONT_SECTION("ucg_font_fixed_v0_tr");
extern const ucg_fntpgm_uint8_t ucg_font_freedoomr10_tr[] UCG_FONT_SECTION("ucg_font_freedoomr10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_freedoomr25_tn[] UCG_FONT_SECTION("ucg_font_freedoomr25_tn");
extern const ucg_fntpgm_uint8_t ucg_font_helvB08_hf[] UCG_FONT_SECTION("ucg_font_helvB08_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB08_hr[] UCG_FONT_SECTION("ucg_font_helvB08_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB08_tf[] UCG_FONT_SECTION("ucg_font_helvB08_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB08_tr[] UCG_FONT_SECTION("ucg_font_helvB08_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB10_hf[] UCG_FONT_SECTION("ucg_font_helvB10_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB10_hr[] UCG_FONT_SECTION("ucg_font_helvB10_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB10_tf[] UCG_FONT_SECTION("ucg_font_helvB10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB10_tr[] UCG_FONT_SECTION("ucg_font_helvB10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB12_hf[] UCG_FONT_SECTION("ucg_font_helvB12_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB12_hr[] UCG_FONT_SECTION("ucg_font_helvB12_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB12_tf[] UCG_FONT_SECTION("ucg_font_helvB12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB12_tr[] UCG_FONT_SECTION("ucg_font_helvB12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB14_hf[] UCG_FONT_SECTION("ucg_font_helvB14_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB14_hr[] UCG_FONT_SECTION("ucg_font_helvB14_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB14_tf[] UCG_FONT_SECTION("ucg_font_helvB14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB14_tr[] UCG_FONT_SECTION("ucg_font_helvB14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB18_hf[] UCG_FONT_SECTION("ucg_font_helvB18_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB18_hr[] UCG_FONT_SECTION("ucg_font_helvB18_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB18_tf[] UCG_FONT_SECTION("ucg_font_helvB18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB18_tr[] UCG_FONT_SECTION("ucg_font_helvB18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB24_hf[] UCG_FONT_SECTION("ucg_font_helvB24_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB24_hn[] UCG_FONT_SECTION("ucg_font_helvB24_hn");
extern const ucg_fntpgm_uint8_t ucg_font_helvB24_hr[] UCG_FONT_SECTION("ucg_font_helvB24_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvB24_tf[] UCG_FONT_SECTION("ucg_font_helvB24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvB24_tn[] UCG_FONT_SECTION("ucg_font_helvB24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_helvB24_tr[] UCG_FONT_SECTION("ucg_font_helvB24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR08_hf[] UCG_FONT_SECTION("ucg_font_helvR08_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR08_hr[] UCG_FONT_SECTION("ucg_font_helvR08_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR08_tf[] UCG_FONT_SECTION("ucg_font_helvR08_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR08_tr[] UCG_FONT_SECTION("ucg_font_helvR08_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR10_hf[] UCG_FONT_SECTION("ucg_font_helvR10_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR10_hr[] UCG_FONT_SECTION("ucg_font_helvR10_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR10_tf[] UCG_FONT_SECTION("ucg_font_helvR10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR10_tr[] UCG_FONT_SECTION("ucg_font_helvR10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR12_hf[] UCG_FONT_SECTION("ucg_font_helvR12_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR12_hr[] UCG_FONT_SECTION("ucg_font_helvR12_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR12_tf[] UCG_FONT_SECTION("ucg_font_helvR12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR12_tr[] UCG_FONT_SECTION("ucg_font_helvR12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR14_hf[] UCG_FONT_SECTION("ucg_font_helvR14_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR14_hr[] UCG_FONT_SECTION("ucg_font_helvR14_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR14_tf[] UCG_FONT_SECTION("ucg_font_helvR14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR14_tr[] UCG_FONT_SECTION("ucg_font_helvR14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR18_hf[] UCG_FONT_SECTION("ucg_font_helvR18_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR18_hr[] UCG_FONT_SECTION("ucg_font_helvR18_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR18_tf[] UCG_FONT_SECTION("ucg_font_helvR18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR18_tr[] UCG_FONT_SECTION("ucg_font_helvR18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR24_hf[] UCG_FONT_SECTION("ucg_font_helvR24_hf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR24_hn[] UCG_FONT_SECTION("ucg_font_helvR24_hn");
extern const ucg_fntpgm_uint8_t ucg_font_helvR24_hr[] UCG_FONT_SECTION("ucg_font_helvR24_hr");
extern const ucg_fntpgm_uint8_t ucg_font_helvR24_tf[] UCG_FONT_SECTION("ucg_font_helvR24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_helvR24_tn[] UCG_FONT_SECTION("ucg_font_helvR24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_helvR24_tr[] UCG_FONT_SECTION("ucg_font_helvR24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_lucasfont_alternate_hf[] UCG_FONT_SECTION("ucg_font_lucasfont_alternate_hf");
extern const ucg_fntpgm_uint8_t ucg_font_lucasfont_alternate_hn[] UCG_FONT_SECTION("ucg_font_lucasfont_alternate_hn");
extern const ucg_fntpgm_uint8_t ucg_font_lucasfont_alternate_hr[] UCG_FONT_SECTION("ucg_font_lucasfont_alternate_hr");
extern const ucg_fntpgm_uint8_t ucg_font_lucasfont_alternate_tf[] UCG_FONT_SECTION("ucg_font_lucasfont_alternate_tf");
extern const ucg_fntpgm_uint8_t ucg_font_lucasfont_alternate_tn[] UCG_FONT_SECTION("ucg_font_lucasfont_alternate_tn");
extern const ucg_fntpgm_uint8_t ucg_font_lucasfont_alternate_tr[] UCG_FONT_SECTION("ucg_font_lucasfont_alternate_tr");
extern const ucg_fntpgm_uint8_t ucg_font_m2icon_5[] UCG_FONT_SECTION("ucg_font_m2icon_5");
extern const ucg_fntpgm_uint8_t ucg_font_m2icon_7[] UCG_FONT_SECTION("ucg_font_m2icon_7");
extern const ucg_fntpgm_uint8_t ucg_font_m2icon_9[] UCG_FONT_SECTION("ucg_font_m2icon_9");
extern const ucg_fntpgm_uint8_t ucg_font_micro_mf[] UCG_FONT_SECTION("ucg_font_micro_mf");
extern const ucg_fntpgm_uint8_t ucg_font_micro_tf[] UCG_FONT_SECTION("ucg_font_micro_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB08_hf[] UCG_FONT_SECTION("ucg_font_ncenB08_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB08_hr[] UCG_FONT_SECTION("ucg_font_ncenB08_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB08_tf[] UCG_FONT_SECTION("ucg_font_ncenB08_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB08_tr[] UCG_FONT_SECTION("ucg_font_ncenB08_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB10_hf[] UCG_FONT_SECTION("ucg_font_ncenB10_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB10_hr[] UCG_FONT_SECTION("ucg_font_ncenB10_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB10_tf[] UCG_FONT_SECTION("ucg_font_ncenB10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB10_tr[] UCG_FONT_SECTION("ucg_font_ncenB10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB12_hf[] UCG_FONT_SECTION("ucg_font_ncenB12_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB12_hr[] UCG_FONT_SECTION("ucg_font_ncenB12_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB12_tf[] UCG_FONT_SECTION("ucg_font_ncenB12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB12_tr[] UCG_FONT_SECTION("ucg_font_ncenB12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB14_hf[] UCG_FONT_SECTION("ucg_font_ncenB14_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB14_hr[] UCG_FONT_SECTION("ucg_font_ncenB14_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB14_tf[] UCG_FONT_SECTION("ucg_font_ncenB14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB14_tr[] UCG_FONT_SECTION("ucg_font_ncenB14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB18_hf[] UCG_FONT_SECTION("ucg_font_ncenB18_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB18_hr[] UCG_FONT_SECTION("ucg_font_ncenB18_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB18_tf[] UCG_FONT_SECTION("ucg_font_ncenB18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB18_tr[] UCG_FONT_SECTION("ucg_font_ncenB18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB24_hf[] UCG_FONT_SECTION("ucg_font_ncenB24_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB24_hn[] UCG_FONT_SECTION("ucg_font_ncenB24_hn");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB24_hr[] UCG_FONT_SECTION("ucg_font_ncenB24_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB24_tf[] UCG_FONT_SECTION("ucg_font_ncenB24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB24_tn[] UCG_FONT_SECTION("ucg_font_ncenB24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_ncenB24_tr[] UCG_FONT_SECTION("ucg_font_ncenB24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR08_hf[] UCG_FONT_SECTION("ucg_font_ncenR08_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR08_hr[] UCG_FONT_SECTION("ucg_font_ncenR08_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR08_tf[] UCG_FONT_SECTION("ucg_font_ncenR08_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR08_tr[] UCG_FONT_SECTION("ucg_font_ncenR08_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR10_hf[] UCG_FONT_SECTION("ucg_font_ncenR10_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR10_hr[] UCG_FONT_SECTION("ucg_font_ncenR10_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR10_tf[] UCG_FONT_SECTION("ucg_font_ncenR10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR10_tr[] UCG_FONT_SECTION("ucg_font_ncenR10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR12_hf[] UCG_FONT_SECTION("ucg_font_ncenR12_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR12_hr[] UCG_FONT_SECTION("ucg_font_ncenR12_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR12_tf[] UCG_FONT_SECTION("ucg_font_ncenR12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR12_tr[] UCG_FONT_SECTION("ucg_font_ncenR12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR14_hf[] UCG_FONT_SECTION("ucg_font_ncenR14_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR14_hr[] UCG_FONT_SECTION("ucg_font_ncenR14_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR14_tf[] UCG_FONT_SECTION("ucg_font_ncenR14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR14_tr[] UCG_FONT_SECTION("ucg_font_ncenR14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR18_hf[] UCG_FONT_SECTION("ucg_font_ncenR18_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR18_hr[] UCG_FONT_SECTION("ucg_font_ncenR18_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR18_tf[] UCG_FONT_SECTION("ucg_font_ncenR18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR18_tr[] UCG_FONT_SECTION("ucg_font_ncenR18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR24_hf[] UCG_FONT_SECTION("ucg_font_ncenR24_hf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR24_hn[] UCG_FONT_SECTION("ucg_font_ncenR24_hn");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR24_hr[] UCG_FONT_SECTION("ucg_font_ncenR24_hr");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR24_tf[] UCG_FONT_SECTION("ucg_font_ncenR24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR24_tn[] UCG_FONT_SECTION("ucg_font_ncenR24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_ncenR24_tr[] UCG_FONT_SECTION("ucg_font_ncenR24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_orgv01_hf[] UCG_FONT_SECTION("ucg_font_orgv01_hf");
extern const ucg_fntpgm_uint8_t ucg_font_orgv01_hn[] UCG_FONT_SECTION("ucg_font_orgv01_hn");
extern const ucg_fntpgm_uint8_t ucg_font_orgv01_hr[] UCG_FONT_SECTION("ucg_font_orgv01_hr");
extern const ucg_fntpgm_uint8_t ucg_font_orgv01_tf[] UCG_FONT_SECTION("ucg_font_orgv01_tf");
extern const ucg_fntpgm_uint8_t ucg_font_orgv01_tn[] UCG_FONT_SECTION("ucg_font_orgv01_tn");
extern const ucg_fntpgm_uint8_t ucg_font_orgv01_tr[] UCG_FONT_SECTION("ucg_font_orgv01_tr");
extern const ucg_fntpgm_uint8_t ucg_font_p01type_hf[] UCG_FONT_SECTION("ucg_font_p01type_hf");
extern const ucg_fntpgm_uint8_t ucg_font_p01type_hn[] UCG_FONT_SECTION("ucg_font_p01type_hn");
extern const ucg_fntpgm_uint8_t ucg_font_p01type_hr[] UCG_FONT_SECTION("ucg_font_p01type_hr");
extern const ucg_fntpgm_uint8_t ucg_font_p01type_tf[] UCG_FONT_SECTION("ucg_font_p01type_tf");
extern const ucg_fntpgm_uint8_t ucg_font_p01type_tn[] UCG_FONT_SECTION("ucg_font_p01type_tn");
extern const ucg_fntpgm_uint8_t ucg_font_p01type_tr[] UCG_FONT_SECTION("ucg_font_p01type_tr");
extern const ucg_fntpgm_uint8_t ucg_font_pixelle_micro_hf[] UCG_FONT_SECTION("ucg_font_pixelle_micro_hf");
extern const ucg_fntpgm_uint8_t ucg_font_pixelle_micro_hn[] UCG_FONT_SECTION("ucg_font_pixelle_micro_hn");
extern const ucg_fntpgm_uint8_t ucg_font_pixelle_micro_hr[] UCG_FONT_SECTION("ucg_font_pixelle_micro_hr");
extern const ucg_fntpgm_uint8_t ucg_font_pixelle_micro_tf[] UCG_FONT_SECTION("ucg_font_pixelle_micro_tf");
extern const ucg_fntpgm_uint8_t ucg_font_pixelle_micro_tn[] UCG_FONT_SECTION("ucg_font_pixelle_micro_tn");
extern const ucg_fntpgm_uint8_t ucg_font_pixelle_micro_tr[] UCG_FONT_SECTION("ucg_font_pixelle_micro_tr");
extern const ucg_fntpgm_uint8_t ucg_font_profont10_8f[] UCG_FONT_SECTION("ucg_font_profont10_8f");
extern const ucg_fntpgm_uint8_t ucg_font_profont10_8r[] UCG_FONT_SECTION("ucg_font_profont10_8r");
extern const ucg_fntpgm_uint8_t ucg_font_profont10_mf[] UCG_FONT_SECTION("ucg_font_profont10_mf");
extern const ucg_fntpgm_uint8_t ucg_font_profont10_mr[] UCG_FONT_SECTION("ucg_font_profont10_mr");
extern const ucg_fntpgm_uint8_t ucg_font_profont11_8f[] UCG_FONT_SECTION("ucg_font_profont11_8f");
extern const ucg_fntpgm_uint8_t ucg_font_profont11_8r[] UCG_FONT_SECTION("ucg_font_profont11_8r");
extern const ucg_fntpgm_uint8_t ucg_font_profont11_mf[] UCG_FONT_SECTION("ucg_font_profont11_mf");
extern const ucg_fntpgm_uint8_t ucg_font_profont11_mr[] UCG_FONT_SECTION("ucg_font_profont11_mr");
extern const ucg_fntpgm_uint8_t ucg_font_profont12_8f[] UCG_FONT_SECTION("ucg_font_profont12_8f");
extern const ucg_fntpgm_uint8_t ucg_font_profont12_8r[] UCG_FONT_SECTION("ucg_font_profont12_8r");
extern const ucg_fntpgm_uint8_t ucg_font_profont12_mf[] UCG_FONT_SECTION("ucg_font_profont12_mf");
extern const ucg_fntpgm_uint8_t ucg_font_profont12_mr[] UCG_FONT_SECTION("ucg_font_profont12_mr");
extern const ucg_fntpgm_uint8_t ucg_font_profont15_8f[] UCG_FONT_SECTION("ucg_font_profont15_8f");
extern const ucg_fntpgm_uint8_t ucg_font_profont15_8r[] UCG_FONT_SECTION("ucg_font_profont15_8r");
extern const ucg_fntpgm_uint8_t ucg_font_profont15_mf[] UCG_FONT_SECTION("ucg_font_profont15_mf");
extern const ucg_fntpgm_uint8_t ucg_font_profont15_mr[] UCG_FONT_SECTION("ucg_font_profont15_mr");
extern const ucg_fntpgm_uint8_t ucg_font_profont17_8f[] UCG_FONT_SECTION("ucg_font_profont17_8f");
extern const ucg_fntpgm_uint8_t ucg_font_profont17_8r[] UCG_FONT_SECTION("ucg_font_profont17_8r");
extern const ucg_fntpgm_uint8_t ucg_font_profont17_mf[] UCG_FONT_SECTION("ucg_font_profont17_mf");
extern const ucg_fntpgm_uint8_t ucg_font_profont17_mr[] UCG_FONT_SECTION("ucg_font_profont17_mr");
extern const ucg_fntpgm_uint8_t ucg_font_profont22_8f[] UCG_FONT_SECTION("ucg_font_profont22_8f");
extern const ucg_fntpgm_uint8_t ucg_font_profont22_8n[] UCG_FONT_SECTION("ucg_font_profont22_8n");
extern const ucg_fntpgm_uint8_t ucg_font_profont22_8r[] UCG_FONT_SECTION("ucg_font_profont22_8r");
extern const ucg_fntpgm_uint8_t ucg_font_profont22_mf[] UCG_FONT_SECTION("ucg_font_profont22_mf");
extern const ucg_fntpgm_uint8_t ucg_font_profont22_mn[] UCG_FONT_SECTION("ucg_font_profont22_mn");
extern const ucg_fntpgm_uint8_t ucg_font_profont22_mr[] UCG_FONT_SECTION("ucg_font_profont22_mr");
extern const ucg_fntpgm_uint8_t ucg_font_profont29_8f[] UCG_FONT_SECTION("ucg_font_profont29_8f");
extern const ucg_fntpgm_uint8_t ucg_font_profont29_8n[] UCG_FONT_SECTION("ucg_font_profont29_8n");
extern const ucg_fntpgm_uint8_t ucg_font_profont29_8r[] UCG_FONT_SECTION("ucg_font_profont29_8r");
extern const ucg_fntpgm_uint8_t ucg_font_profont29_mf[] UCG_FONT_SECTION("ucg_font_profont29_mf");
extern const ucg_fntpgm_uint8_t ucg_font_profont29_mn[] UCG_FONT_SECTION("ucg_font_profont29_mn");
extern const ucg_fntpgm_uint8_t ucg_font_profont29_mr[] UCG_FONT_SECTION("ucg_font_profont29_mr");
extern const ucg_fntpgm_uint8_t ucg_font_robot_de_niro_hf[] UCG_FONT_SECTION("ucg_font_robot_de_niro_hf");
extern const ucg_fntpgm_uint8_t ucg_font_robot_de_niro_hn[] UCG_FONT_SECTION("ucg_font_robot_de_niro_hn");
extern const ucg_fntpgm_uint8_t ucg_font_robot_de_niro_hr[] UCG_FONT_SECTION("ucg_font_robot_de_niro_hr");
extern const ucg_fntpgm_uint8_t ucg_font_robot_de_niro_tf[] UCG_FONT_SECTION("ucg_font_robot_de_niro_tf");
extern const ucg_fntpgm_uint8_t ucg_font_robot_de_niro_tn[] UCG_FONT_SECTION("ucg_font_robot_de_niro_tn");
extern const ucg_fntpgm_uint8_t ucg_font_robot_de_niro_tr[] UCG_FONT_SECTION("ucg_font_robot_de_niro_tr");
extern const ucg_fntpgm_uint8_t ucg_font_symb08_tf[] UCG_FONT_SECTION("ucg_font_symb08_tf");
extern const ucg_fntpgm_uint8_t ucg_font_symb08_tr[] UCG_FONT_SECTION("ucg_font_symb08_tr");
extern const ucg_fntpgm_uint8_t ucg_font_symb10_tf[] UCG_FONT_SECTION("ucg_font_symb10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_symb10_tr[] UCG_FONT_SECTION("ucg_font_symb10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_symb12_tf[] UCG_FONT_SECTION("ucg_font_symb12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_symb12_tr[] UCG_FONT_SECTION("ucg_font_symb12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_symb14_tf[] UCG_FONT_SECTION("ucg_font_symb14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_symb14_tr[] UCG_FONT_SECTION("ucg_font_symb14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_symb18_tf[] UCG_FONT_SECTION("ucg_font_symb18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_symb18_tr[] UCG_FONT_SECTION("ucg_font_symb18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_symb24_tf[] UCG_FONT_SECTION("ucg_font_symb24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_symb24_tr[] UCG_FONT_SECTION("ucg_font_symb24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timB08_hf[] UCG_FONT_SECTION("ucg_font_timB08_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timB08_hr[] UCG_FONT_SECTION("ucg_font_timB08_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timB08_tf[] UCG_FONT_SECTION("ucg_font_timB08_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timB08_tr[] UCG_FONT_SECTION("ucg_font_timB08_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timB10_hf[] UCG_FONT_SECTION("ucg_font_timB10_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timB10_hr[] UCG_FONT_SECTION("ucg_font_timB10_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timB10_tf[] UCG_FONT_SECTION("ucg_font_timB10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timB10_tr[] UCG_FONT_SECTION("ucg_font_timB10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timB12_hf[] UCG_FONT_SECTION("ucg_font_timB12_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timB12_hr[] UCG_FONT_SECTION("ucg_font_timB12_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timB12_tf[] UCG_FONT_SECTION("ucg_font_timB12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timB12_tr[] UCG_FONT_SECTION("ucg_font_timB12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timB14_hf[] UCG_FONT_SECTION("ucg_font_timB14_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timB14_hr[] UCG_FONT_SECTION("ucg_font_timB14_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timB14_tf[] UCG_FONT_SECTION("ucg_font_timB14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timB14_tr[] UCG_FONT_SECTION("ucg_font_timB14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timB18_hf[] UCG_FONT_SECTION("ucg_font_timB18_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timB18_hr[] UCG_FONT_SECTION("ucg_font_timB18_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timB18_tf[] UCG_FONT_SECTION("ucg_font_timB18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timB18_tr[] UCG_FONT_SECTION("ucg_font_timB18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timB24_hf[] UCG_FONT_SECTION("ucg_font_timB24_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timB24_hn[] UCG_FONT_SECTION("ucg_font_timB24_hn");
extern const ucg_fntpgm_uint8_t ucg_font_timB24_hr[] UCG_FONT_SECTION("ucg_font_timB24_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timB24_tf[] UCG_FONT_SECTION("ucg_font_timB24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timB24_tn[] UCG_FONT_SECTION("ucg_font_timB24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_timB24_tr[] UCG_FONT_SECTION("ucg_font_timB24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timR08_hf[] UCG_FONT_SECTION("ucg_font_timR08_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timR08_hr[] UCG_FONT_SECTION("ucg_font_timR08_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timR08_tf[] UCG_FONT_SECTION("ucg_font_timR08_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timR08_tr[] UCG_FONT_SECTION("ucg_font_timR08_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timR10_hf[] UCG_FONT_SECTION("ucg_font_timR10_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timR10_hr[] UCG_FONT_SECTION("ucg_font_timR10_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timR10_tf[] UCG_FONT_SECTION("ucg_font_timR10_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timR10_tr[] UCG_FONT_SECTION("ucg_font_timR10_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timR12_hf[] UCG_FONT_SECTION("ucg_font_timR12_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timR12_hr[] UCG_FONT_SECTION("ucg_font_timR12_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timR12_tf[] UCG_FONT_SECTION("ucg_font_timR12_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timR12_tr[] UCG_FONT_SECTION("ucg_font_timR12_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timR14_hf[] UCG_FONT_SECTION("ucg_font_timR14_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timR14_hr[] UCG_FONT_SECTION("ucg_font_timR14_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timR14_tf[] UCG_FONT_SECTION("ucg_font_timR14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timR14_tr[] UCG_FONT_SECTION("ucg_font_timR14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timR18_hf[] UCG_FONT_SECTION("ucg_font_timR18_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timR18_hr[] UCG_FONT_SECTION("ucg_font_timR18_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timR18_tf[] UCG_FONT_SECTION("ucg_font_timR18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timR18_tr[] UCG_FONT_SECTION("ucg_font_timR18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_timR24_hf[] UCG_FONT_SECTION("ucg_font_timR24_hf");
extern const ucg_fntpgm_uint8_t ucg_font_timR24_hn[] UCG_FONT_SECTION("ucg_font_timR24_hn");
extern const ucg_fntpgm_uint8_t ucg_font_timR24_hr[] UCG_FONT_SECTION("ucg_font_timR24_hr");
extern const ucg_fntpgm_uint8_t ucg_font_timR24_tf[] UCG_FONT_SECTION("ucg_font_timR24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_timR24_tn[] UCG_FONT_SECTION("ucg_font_timR24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_timR24_tr[] UCG_FONT_SECTION("ucg_font_timR24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_tpssb_hf[] UCG_FONT_SECTION("ucg_font_tpssb_hf");
extern const ucg_fntpgm_uint8_t ucg_font_tpssb_hn[] UCG_FONT_SECTION("ucg_font_tpssb_hn");
extern const ucg_fntpgm_uint8_t ucg_font_tpssb_hr[] UCG_FONT_SECTION("ucg_font_tpssb_hr");
extern const ucg_fntpgm_uint8_t ucg_font_tpssb_tf[] UCG_FONT_SECTION("ucg_font_tpssb_tf");
extern const ucg_fntpgm_uint8_t ucg_font_tpssb_tn[] UCG_FONT_SECTION("ucg_font_tpssb_tn");
extern const ucg_fntpgm_uint8_t ucg_font_tpssb_tr[] UCG_FONT_SECTION("ucg_font_tpssb_tr");
extern const ucg_fntpgm_uint8_t ucg_font_tpss_hf[] UCG_FONT_SECTION("ucg_font_tpss_hf");
extern const ucg_fntpgm_uint8_t ucg_font_tpss_hn[] UCG_FONT_SECTION("ucg_font_tpss_hn");
extern const ucg_fntpgm_uint8_t ucg_font_tpss_hr[] UCG_FONT_SECTION("ucg_font_tpss_hr");
extern const ucg_fntpgm_uint8_t ucg_font_tpss_tf[] UCG_FONT_SECTION("ucg_font_tpss_tf");
extern const ucg_fntpgm_uint8_t ucg_font_tpss_tn[] UCG_FONT_SECTION("ucg_font_tpss_tn");
extern const ucg_fntpgm_uint8_t ucg_font_tpss_tr[] UCG_FONT_SECTION("ucg_font_tpss_tr");
extern const ucg_fntpgm_uint8_t ucg_font_trixel_square_hf[] UCG_FONT_SECTION("ucg_font_trixel_square_hf");
extern const ucg_fntpgm_uint8_t ucg_font_trixel_square_hn[] UCG_FONT_SECTION("ucg_font_trixel_square_hn");
extern const ucg_fntpgm_uint8_t ucg_font_trixel_square_hr[] UCG_FONT_SECTION("ucg_font_trixel_square_hr");
extern const ucg_fntpgm_uint8_t ucg_font_trixel_square_tf[] UCG_FONT_SECTION("ucg_font_trixel_square_tf");
extern const ucg_fntpgm_uint8_t ucg_font_trixel_square_tn[] UCG_FONT_SECTION("ucg_font_trixel_square_tn");
extern const ucg_fntpgm_uint8_t ucg_font_trixel_square_tr[] UCG_FONT_SECTION("ucg_font_trixel_square_tr");
extern const ucg_fntpgm_uint8_t ucg_font_u8glib_4_hf[] UCG_FONT_SECTION("ucg_font_u8glib_4_hf");
extern const ucg_fntpgm_uint8_t ucg_font_u8glib_4_hr[] UCG_FONT_SECTION("ucg_font_u8glib_4_hr");
extern const ucg_fntpgm_uint8_t ucg_font_u8glib_4_tf[] UCG_FONT_SECTION("ucg_font_u8glib_4_tf");
extern const ucg_fntpgm_uint8_t ucg_font_u8glib_4_tr[] UCG_FONT_SECTION("ucg_font_u8glib_4_tr");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_0_8[] UCG_FONT_SECTION("ucg_font_unifont_0_8");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_12_13[] UCG_FONT_SECTION("ucg_font_unifont_12_13");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_18_19[] UCG_FONT_SECTION("ucg_font_unifont_18_19");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_2_3[] UCG_FONT_SECTION("ucg_font_unifont_2_3");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_4_5[] UCG_FONT_SECTION("ucg_font_unifont_4_5");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_67_75[] UCG_FONT_SECTION("ucg_font_unifont_67_75");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_72_73[] UCG_FONT_SECTION("ucg_font_unifont_72_73");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_78_79[] UCG_FONT_SECTION("ucg_font_unifont_78_79");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_8_9[] UCG_FONT_SECTION("ucg_font_unifont_8_9");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_mf[] UCG_FONT_SECTION("ucg_font_unifont_mf");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_mr[] UCG_FONT_SECTION("ucg_font_unifont_mr");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_tf[] UCG_FONT_SECTION("ucg_font_unifont_tf");
extern const ucg_fntpgm_uint8_t ucg_font_unifont_tr[] UCG_FONT_SECTION("ucg_font_unifont_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fub11_hf[] UCG_FONT_SECTION("ucg_font_fub11_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fub11_hn[] UCG_FONT_SECTION("ucg_font_fub11_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fub11_hr[] UCG_FONT_SECTION("ucg_font_fub11_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fub11_tf[] UCG_FONT_SECTION("ucg_font_fub11_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fub11_tn[] UCG_FONT_SECTION("ucg_font_fub11_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fub11_tr[] UCG_FONT_SECTION("ucg_font_fub11_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fub14_hf[] UCG_FONT_SECTION("ucg_font_fub14_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fub14_hn[] UCG_FONT_SECTION("ucg_font_fub14_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fub14_hr[] UCG_FONT_SECTION("ucg_font_fub14_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fub14_tf[] UCG_FONT_SECTION("ucg_font_fub14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fub14_tn[] UCG_FONT_SECTION("ucg_font_fub14_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fub14_tr[] UCG_FONT_SECTION("ucg_font_fub14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fub17_hf[] UCG_FONT_SECTION("ucg_font_fub17_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fub17_hn[] UCG_FONT_SECTION("ucg_font_fub17_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fub17_hr[] UCG_FONT_SECTION("ucg_font_fub17_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fub17_tf[] UCG_FONT_SECTION("ucg_font_fub17_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fub17_tn[] UCG_FONT_SECTION("ucg_font_fub17_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fub17_tr[] UCG_FONT_SECTION("ucg_font_fub17_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fub20_hf[] UCG_FONT_SECTION("ucg_font_fub20_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fub20_hn[] UCG_FONT_SECTION("ucg_font_fub20_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fub20_hr[] UCG_FONT_SECTION("ucg_font_fub20_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fub20_tf[] UCG_FONT_SECTION("ucg_font_fub20_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fub20_tn[] UCG_FONT_SECTION("ucg_font_fub20_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fub20_tr[] UCG_FONT_SECTION("ucg_font_fub20_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fub25_hf[] UCG_FONT_SECTION("ucg_font_fub25_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fub25_hn[] UCG_FONT_SECTION("ucg_font_fub25_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fub25_hr[] UCG_FONT_SECTION("ucg_font_fub25_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fub25_tf[] UCG_FONT_SECTION("ucg_font_fub25_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fub25_tn[] UCG_FONT_SECTION("ucg_font_fub25_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fub25_tr[] UCG_FONT_SECTION("ucg_font_fub25_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fub30_hf[] UCG_FONT_SECTION("ucg_font_fub30_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fub30_hn[] UCG_FONT_SECTION("ucg_font_fub30_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fub30_hr[] UCG_FONT_SECTION("ucg_font_fub30_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fub30_tf[] UCG_FONT_SECTION("ucg_font_fub30_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fub30_tn[] UCG_FONT_SECTION("ucg_font_fub30_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fub30_tr[] UCG_FONT_SECTION("ucg_font_fub30_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fub35_hf[] UCG_FONT_SECTION("ucg_font_fub35_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fub35_hn[] UCG_FONT_SECTION("ucg_font_fub35_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fub35_hr[] UCG_FONT_SECTION("ucg_font_fub35_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fub35_tf[] UCG_FONT_SECTION("ucg_font_fub35_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fub35_tn[] UCG_FONT_SECTION("ucg_font_fub35_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fub35_tr[] UCG_FONT_SECTION("ucg_font_fub35_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fub42_hf[] UCG_FONT_SECTION("ucg_font_fub42_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fub42_hn[] UCG_FONT_SECTION("ucg_font_fub42_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fub42_hr[] UCG_FONT_SECTION("ucg_font_fub42_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fub42_tf[] UCG_FONT_SECTION("ucg_font_fub42_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fub42_tn[] UCG_FONT_SECTION("ucg_font_fub42_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fub42_tr[] UCG_FONT_SECTION("ucg_font_fub42_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fub49_hn[] UCG_FONT_SECTION("ucg_font_fub49_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fub49_tn[] UCG_FONT_SECTION("ucg_font_fub49_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur11_hf[] UCG_FONT_SECTION("ucg_font_fur11_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fur11_hn[] UCG_FONT_SECTION("ucg_font_fur11_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fur11_hr[] UCG_FONT_SECTION("ucg_font_fur11_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fur11_tf[] UCG_FONT_SECTION("ucg_font_fur11_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fur11_tn[] UCG_FONT_SECTION("ucg_font_fur11_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur11_tr[] UCG_FONT_SECTION("ucg_font_fur11_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fur14_hf[] UCG_FONT_SECTION("ucg_font_fur14_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fur14_hn[] UCG_FONT_SECTION("ucg_font_fur14_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fur14_hr[] UCG_FONT_SECTION("ucg_font_fur14_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fur14_tf[] UCG_FONT_SECTION("ucg_font_fur14_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fur14_tn[] UCG_FONT_SECTION("ucg_font_fur14_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur14_tr[] UCG_FONT_SECTION("ucg_font_fur14_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fur17_hf[] UCG_FONT_SECTION("ucg_font_fur17_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fur17_hn[] UCG_FONT_SECTION("ucg_font_fur17_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fur17_hr[] UCG_FONT_SECTION("ucg_font_fur17_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fur17_tf[] UCG_FONT_SECTION("ucg_font_fur17_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fur17_tn[] UCG_FONT_SECTION("ucg_font_fur17_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur17_tr[] UCG_FONT_SECTION("ucg_font_fur17_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fur20_hf[] UCG_FONT_SECTION("ucg_font_fur20_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fur20_hn[] UCG_FONT_SECTION("ucg_font_fur20_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fur20_hr[] UCG_FONT_SECTION("ucg_font_fur20_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fur20_tf[] UCG_FONT_SECTION("ucg_font_fur20_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fur20_tn[] UCG_FONT_SECTION("ucg_font_fur20_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur20_tr[] UCG_FONT_SECTION("ucg_font_fur20_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fur25_hf[] UCG_FONT_SECTION("ucg_font_fur25_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fur25_hn[] UCG_FONT_SECTION("ucg_font_fur25_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fur25_hr[] UCG_FONT_SECTION("ucg_font_fur25_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fur25_tf[] UCG_FONT_SECTION("ucg_font_fur25_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fur25_tn[] UCG_FONT_SECTION("ucg_font_fur25_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur25_tr[] UCG_FONT_SECTION("ucg_font_fur25_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fur30_hf[] UCG_FONT_SECTION("ucg_font_fur30_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fur30_hn[] UCG_FONT_SECTION("ucg_font_fur30_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fur30_hr[] UCG_FONT_SECTION("ucg_font_fur30_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fur30_tf[] UCG_FONT_SECTION("ucg_font_fur30_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fur30_tn[] UCG_FONT_SECTION("ucg_font_fur30_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur30_tr[] UCG_FONT_SECTION("ucg_font_fur30_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fur35_hf[] UCG_FONT_SECTION("ucg_font_fur35_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fur35_hn[] UCG_FONT_SECTION("ucg_font_fur35_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fur35_hr[] UCG_FONT_SECTION("ucg_font_fur35_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fur35_tf[] UCG_FONT_SECTION("ucg_font_fur35_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fur35_tn[] UCG_FONT_SECTION("ucg_font_fur35_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur35_tr[] UCG_FONT_SECTION("ucg_font_fur35_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fur42_hf[] UCG_FONT_SECTION("ucg_font_fur42_hf");
extern const ucg_fntpgm_uint8_t ucg_font_fur42_hn[] UCG_FONT_SECTION("ucg_font_fur42_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fur42_hr[] UCG_FONT_SECTION("ucg_font_fur42_hr");
extern const ucg_fntpgm_uint8_t ucg_font_fur42_tf[] UCG_FONT_SECTION("ucg_font_fur42_tf");
extern const ucg_fntpgm_uint8_t ucg_font_fur42_tn[] UCG_FONT_SECTION("ucg_font_fur42_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur42_tr[] UCG_FONT_SECTION("ucg_font_fur42_tr");
extern const ucg_fntpgm_uint8_t ucg_font_fur49_hn[] UCG_FONT_SECTION("ucg_font_fur49_hn");
extern const ucg_fntpgm_uint8_t ucg_font_fur49_tn[] UCG_FONT_SECTION("ucg_font_fur49_tn");
extern const ucg_fntpgm_uint8_t ucg_font_fur49_tr[] UCG_FONT_SECTION("ucg_font_fur49_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb16_mf[] UCG_FONT_SECTION("ucg_font_inb16_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb16_mn[] UCG_FONT_SECTION("ucg_font_inb16_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb16_mr[] UCG_FONT_SECTION("ucg_font_inb16_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb16_tf[] UCG_FONT_SECTION("ucg_font_inb16_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb16_tn[] UCG_FONT_SECTION("ucg_font_inb16_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb16_tr[] UCG_FONT_SECTION("ucg_font_inb16_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb19_mf[] UCG_FONT_SECTION("ucg_font_inb19_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb19_mn[] UCG_FONT_SECTION("ucg_font_inb19_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb19_mr[] UCG_FONT_SECTION("ucg_font_inb19_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb19_tf[] UCG_FONT_SECTION("ucg_font_inb19_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb19_tn[] UCG_FONT_SECTION("ucg_font_inb19_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb19_tr[] UCG_FONT_SECTION("ucg_font_inb19_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb21_mf[] UCG_FONT_SECTION("ucg_font_inb21_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb21_mn[] UCG_FONT_SECTION("ucg_font_inb21_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb21_mr[] UCG_FONT_SECTION("ucg_font_inb21_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb21_tf[] UCG_FONT_SECTION("ucg_font_inb21_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb21_tn[] UCG_FONT_SECTION("ucg_font_inb21_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb21_tr[] UCG_FONT_SECTION("ucg_font_inb21_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb24_mf[] UCG_FONT_SECTION("ucg_font_inb24_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb24_mn[] UCG_FONT_SECTION("ucg_font_inb24_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb24_mr[] UCG_FONT_SECTION("ucg_font_inb24_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb24_tf[] UCG_FONT_SECTION("ucg_font_inb24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb24_tn[] UCG_FONT_SECTION("ucg_font_inb24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb24_tr[] UCG_FONT_SECTION("ucg_font_inb24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb27_mf[] UCG_FONT_SECTION("ucg_font_inb27_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb27_mn[] UCG_FONT_SECTION("ucg_font_inb27_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb27_mr[] UCG_FONT_SECTION("ucg_font_inb27_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb27_tf[] UCG_FONT_SECTION("ucg_font_inb27_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb27_tn[] UCG_FONT_SECTION("ucg_font_inb27_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb27_tr[] UCG_FONT_SECTION("ucg_font_inb27_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb30_mf[] UCG_FONT_SECTION("ucg_font_inb30_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb30_mn[] UCG_FONT_SECTION("ucg_font_inb30_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb30_mr[] UCG_FONT_SECTION("ucg_font_inb30_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb30_tf[] UCG_FONT_SECTION("ucg_font_inb30_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb30_tn[] UCG_FONT_SECTION("ucg_font_inb30_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb30_tr[] UCG_FONT_SECTION("ucg_font_inb30_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb33_mf[] UCG_FONT_SECTION("ucg_font_inb33_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb33_mn[] UCG_FONT_SECTION("ucg_font_inb33_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb33_mr[] UCG_FONT_SECTION("ucg_font_inb33_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb33_tf[] UCG_FONT_SECTION("ucg_font_inb33_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb33_tn[] UCG_FONT_SECTION("ucg_font_inb33_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb33_tr[] UCG_FONT_SECTION("ucg_font_inb33_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb38_mf[] UCG_FONT_SECTION("ucg_font_inb38_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb38_mn[] UCG_FONT_SECTION("ucg_font_inb38_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb38_mr[] UCG_FONT_SECTION("ucg_font_inb38_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb38_tf[] UCG_FONT_SECTION("ucg_font_inb38_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb38_tn[] UCG_FONT_SECTION("ucg_font_inb38_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb38_tr[] UCG_FONT_SECTION("ucg_font_inb38_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb42_mf[] UCG_FONT_SECTION("ucg_font_inb42_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb42_mn[] UCG_FONT_SECTION("ucg_font_inb42_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb42_mr[] UCG_FONT_SECTION("ucg_font_inb42_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb42_tf[] UCG_FONT_SECTION("ucg_font_inb42_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb42_tn[] UCG_FONT_SECTION("ucg_font_inb42_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb42_tr[] UCG_FONT_SECTION("ucg_font_inb42_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb46_mf[] UCG_FONT_SECTION("ucg_font_inb46_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb46_mn[] UCG_FONT_SECTION("ucg_font_inb46_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb46_mr[] UCG_FONT_SECTION("ucg_font_inb46_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb46_tf[] UCG_FONT_SECTION("ucg_font_inb46_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb46_tn[] UCG_FONT_SECTION("ucg_font_inb46_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb46_tr[] UCG_FONT_SECTION("ucg_font_inb46_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb49_mf[] UCG_FONT_SECTION("ucg_font_inb49_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb49_mn[] UCG_FONT_SECTION("ucg_font_inb49_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb49_mr[] UCG_FONT_SECTION("ucg_font_inb49_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb49_tf[] UCG_FONT_SECTION("ucg_font_inb49_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb49_tn[] UCG_FONT_SECTION("ucg_font_inb49_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb49_tr[] UCG_FONT_SECTION("ucg_font_inb49_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb53_mf[] UCG_FONT_SECTION("ucg_font_inb53_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb53_mn[] UCG_FONT_SECTION("ucg_font_inb53_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb53_mr[] UCG_FONT_SECTION("ucg_font_inb53_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb53_tf[] UCG_FONT_SECTION("ucg_font_inb53_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb53_tn[] UCG_FONT_SECTION("ucg_font_inb53_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb53_tr[] UCG_FONT_SECTION("ucg_font_inb53_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb57_mf[] UCG_FONT_SECTION("ucg_font_inb57_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inb57_mn[] UCG_FONT_SECTION("ucg_font_inb57_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb57_mr[] UCG_FONT_SECTION("ucg_font_inb57_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inb57_tf[] UCG_FONT_SECTION("ucg_font_inb57_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb57_tn[] UCG_FONT_SECTION("ucg_font_inb57_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb57_tr[] UCG_FONT_SECTION("ucg_font_inb57_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inb63_mn[] UCG_FONT_SECTION("ucg_font_inb63_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inb63_tf[] UCG_FONT_SECTION("ucg_font_inb63_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inb63_tn[] UCG_FONT_SECTION("ucg_font_inb63_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inb63_tr[] UCG_FONT_SECTION("ucg_font_inb63_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr16_mf[] UCG_FONT_SECTION("ucg_font_inr16_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr16_mn[] UCG_FONT_SECTION("ucg_font_inr16_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr16_mr[] UCG_FONT_SECTION("ucg_font_inr16_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr16_tf[] UCG_FONT_SECTION("ucg_font_inr16_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr16_tn[] UCG_FONT_SECTION("ucg_font_inr16_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr16_tr[] UCG_FONT_SECTION("ucg_font_inr16_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr19_mf[] UCG_FONT_SECTION("ucg_font_inr19_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr19_mn[] UCG_FONT_SECTION("ucg_font_inr19_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr19_mr[] UCG_FONT_SECTION("ucg_font_inr19_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr19_tf[] UCG_FONT_SECTION("ucg_font_inr19_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr19_tn[] UCG_FONT_SECTION("ucg_font_inr19_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr19_tr[] UCG_FONT_SECTION("ucg_font_inr19_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr21_mf[] UCG_FONT_SECTION("ucg_font_inr21_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr21_mn[] UCG_FONT_SECTION("ucg_font_inr21_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr21_mr[] UCG_FONT_SECTION("ucg_font_inr21_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr21_tf[] UCG_FONT_SECTION("ucg_font_inr21_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr21_tn[] UCG_FONT_SECTION("ucg_font_inr21_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr21_tr[] UCG_FONT_SECTION("ucg_font_inr21_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr24_mf[] UCG_FONT_SECTION("ucg_font_inr24_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr24_mn[] UCG_FONT_SECTION("ucg_font_inr24_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr24_mr[] UCG_FONT_SECTION("ucg_font_inr24_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr24_tf[] UCG_FONT_SECTION("ucg_font_inr24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr24_tn[] UCG_FONT_SECTION("ucg_font_inr24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr24_tr[] UCG_FONT_SECTION("ucg_font_inr24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr27_mf[] UCG_FONT_SECTION("ucg_font_inr27_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr27_mn[] UCG_FONT_SECTION("ucg_font_inr27_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr27_mr[] UCG_FONT_SECTION("ucg_font_inr27_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr27_tf[] UCG_FONT_SECTION("ucg_font_inr27_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr27_tn[] UCG_FONT_SECTION("ucg_font_inr27_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr27_tr[] UCG_FONT_SECTION("ucg_font_inr27_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr30_mf[] UCG_FONT_SECTION("ucg_font_inr30_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr30_mn[] UCG_FONT_SECTION("ucg_font_inr30_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr30_mr[] UCG_FONT_SECTION("ucg_font_inr30_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr30_tf[] UCG_FONT_SECTION("ucg_font_inr30_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr30_tn[] UCG_FONT_SECTION("ucg_font_inr30_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr30_tr[] UCG_FONT_SECTION("ucg_font_inr30_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr33_mf[] UCG_FONT_SECTION("ucg_font_inr33_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr33_mn[] UCG_FONT_SECTION("ucg_font_inr33_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr33_mr[] UCG_FONT_SECTION("ucg_font_inr33_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr33_tf[] UCG_FONT_SECTION("ucg_font_inr33_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr33_tn[] UCG_FONT_SECTION("ucg_font_inr33_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr33_tr[] UCG_FONT_SECTION("ucg_font_inr33_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr38_mf[] UCG_FONT_SECTION("ucg_font_inr38_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr38_mn[] UCG_FONT_SECTION("ucg_font_inr38_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr38_mr[] UCG_FONT_SECTION("ucg_font_inr38_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr38_tf[] UCG_FONT_SECTION("ucg_font_inr38_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr38_tn[] UCG_FONT_SECTION("ucg_font_inr38_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr38_tr[] UCG_FONT_SECTION("ucg_font_inr38_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr42_mf[] UCG_FONT_SECTION("ucg_font_inr42_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr42_mn[] UCG_FONT_SECTION("ucg_font_inr42_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr42_mr[] UCG_FONT_SECTION("ucg_font_inr42_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr42_tf[] UCG_FONT_SECTION("ucg_font_inr42_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr42_tn[] UCG_FONT_SECTION("ucg_font_inr42_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr42_tr[] UCG_FONT_SECTION("ucg_font_inr42_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr46_mf[] UCG_FONT_SECTION("ucg_font_inr46_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr46_mn[] UCG_FONT_SECTION("ucg_font_inr46_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr46_mr[] UCG_FONT_SECTION("ucg_font_inr46_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr46_tf[] UCG_FONT_SECTION("ucg_font_inr46_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr46_tn[] UCG_FONT_SECTION("ucg_font_inr46_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr46_tr[] UCG_FONT_SECTION("ucg_font_inr46_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr49_mf[] UCG_FONT_SECTION("ucg_font_inr49_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr49_mn[] UCG_FONT_SECTION("ucg_font_inr49_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr49_mr[] UCG_FONT_SECTION("ucg_font_inr49_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr49_tf[] UCG_FONT_SECTION("ucg_font_inr49_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr49_tn[] UCG_FONT_SECTION("ucg_font_inr49_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr49_tr[] UCG_FONT_SECTION("ucg_font_inr49_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr53_mf[] UCG_FONT_SECTION("ucg_font_inr53_mf");
extern const ucg_fntpgm_uint8_t ucg_font_inr53_mn[] UCG_FONT_SECTION("ucg_font_inr53_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr53_mr[] UCG_FONT_SECTION("ucg_font_inr53_mr");
extern const ucg_fntpgm_uint8_t ucg_font_inr53_tf[] UCG_FONT_SECTION("ucg_font_inr53_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr53_tn[] UCG_FONT_SECTION("ucg_font_inr53_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr53_tr[] UCG_FONT_SECTION("ucg_font_inr53_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr57_mn[] UCG_FONT_SECTION("ucg_font_inr57_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr57_tf[] UCG_FONT_SECTION("ucg_font_inr57_tf");
extern const ucg_fntpgm_uint8_t ucg_font_inr57_tn[] UCG_FONT_SECTION("ucg_font_inr57_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr57_tr[] UCG_FONT_SECTION("ucg_font_inr57_tr");
extern const ucg_fntpgm_uint8_t ucg_font_inr62_mn[] UCG_FONT_SECTION("ucg_font_inr62_mn");
extern const ucg_fntpgm_uint8_t ucg_font_inr62_tn[] UCG_FONT_SECTION("ucg_font_inr62_tn");
extern const ucg_fntpgm_uint8_t ucg_font_inr62_tr[] UCG_FONT_SECTION("ucg_font_inr62_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso16_hf[] UCG_FONT_SECTION("ucg_font_logisoso16_hf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso16_hn[] UCG_FONT_SECTION("ucg_font_logisoso16_hn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso16_hr[] UCG_FONT_SECTION("ucg_font_logisoso16_hr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso16_tf[] UCG_FONT_SECTION("ucg_font_logisoso16_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso16_tn[] UCG_FONT_SECTION("ucg_font_logisoso16_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso16_tr[] UCG_FONT_SECTION("ucg_font_logisoso16_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso18_hf[] UCG_FONT_SECTION("ucg_font_logisoso18_hf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso18_hn[] UCG_FONT_SECTION("ucg_font_logisoso18_hn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso18_hr[] UCG_FONT_SECTION("ucg_font_logisoso18_hr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso18_tf[] UCG_FONT_SECTION("ucg_font_logisoso18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso18_tn[] UCG_FONT_SECTION("ucg_font_logisoso18_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso18_tr[] UCG_FONT_SECTION("ucg_font_logisoso18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso20_hf[] UCG_FONT_SECTION("ucg_font_logisoso20_hf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso20_hn[] UCG_FONT_SECTION("ucg_font_logisoso20_hn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso20_hr[] UCG_FONT_SECTION("ucg_font_logisoso20_hr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso20_tf[] UCG_FONT_SECTION("ucg_font_logisoso20_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso20_tn[] UCG_FONT_SECTION("ucg_font_logisoso20_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso20_tr[] UCG_FONT_SECTION("ucg_font_logisoso20_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso22_hf[] UCG_FONT_SECTION("ucg_font_logisoso22_hf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso22_hn[] UCG_FONT_SECTION("ucg_font_logisoso22_hn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso22_hr[] UCG_FONT_SECTION("ucg_font_logisoso22_hr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso22_tf[] UCG_FONT_SECTION("ucg_font_logisoso22_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso22_tn[] UCG_FONT_SECTION("ucg_font_logisoso22_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso22_tr[] UCG_FONT_SECTION("ucg_font_logisoso22_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso24_hf[] UCG_FONT_SECTION("ucg_font_logisoso24_hf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso24_hn[] UCG_FONT_SECTION("ucg_font_logisoso24_hn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso24_hr[] UCG_FONT_SECTION("ucg_font_logisoso24_hr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso24_tf[] UCG_FONT_SECTION("ucg_font_logisoso24_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso24_tn[] UCG_FONT_SECTION("ucg_font_logisoso24_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso24_tr[] UCG_FONT_SECTION("ucg_font_logisoso24_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso26_hf[] UCG_FONT_SECTION("ucg_font_logisoso26_hf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso26_hn[] UCG_FONT_SECTION("ucg_font_logisoso26_hn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso26_hr[] UCG_FONT_SECTION("ucg_font_logisoso26_hr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso26_tf[] UCG_FONT_SECTION("ucg_font_logisoso26_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso26_tn[] UCG_FONT_SECTION("ucg_font_logisoso26_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso26_tr[] UCG_FONT_SECTION("ucg_font_logisoso26_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso28_hf[] UCG_FONT_SECTION("ucg_font_logisoso28_hf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso28_hn[] UCG_FONT_SECTION("ucg_font_logisoso28_hn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso28_hr[] UCG_FONT_SECTION("ucg_font_logisoso28_hr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso28_tf[] UCG_FONT_SECTION("ucg_font_logisoso28_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso28_tn[] UCG_FONT_SECTION("ucg_font_logisoso28_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso28_tr[] UCG_FONT_SECTION("ucg_font_logisoso28_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso30_tf[] UCG_FONT_SECTION("ucg_font_logisoso30_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso30_tn[] UCG_FONT_SECTION("ucg_font_logisoso30_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso30_tr[] UCG_FONT_SECTION("ucg_font_logisoso30_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso32_tf[] UCG_FONT_SECTION("ucg_font_logisoso32_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso32_tn[] UCG_FONT_SECTION("ucg_font_logisoso32_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso32_tr[] UCG_FONT_SECTION("ucg_font_logisoso32_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso34_tf[] UCG_FONT_SECTION("ucg_font_logisoso34_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso34_tn[] UCG_FONT_SECTION("ucg_font_logisoso34_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso34_tr[] UCG_FONT_SECTION("ucg_font_logisoso34_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso38_tf[] UCG_FONT_SECTION("ucg_font_logisoso38_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso38_tn[] UCG_FONT_SECTION("ucg_font_logisoso38_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso38_tr[] UCG_FONT_SECTION("ucg_font_logisoso38_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso42_tf[] UCG_FONT_SECTION("ucg_font_logisoso42_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso42_tn[] UCG_FONT_SECTION("ucg_font_logisoso42_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso42_tr[] UCG_FONT_SECTION("ucg_font_logisoso42_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso46_tf[] UCG_FONT_SECTION("ucg_font_logisoso46_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso46_tn[] UCG_FONT_SECTION("ucg_font_logisoso46_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso46_tr[] UCG_FONT_SECTION("ucg_font_logisoso46_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso50_tf[] UCG_FONT_SECTION("ucg_font_logisoso50_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso50_tn[] UCG_FONT_SECTION("ucg_font_logisoso50_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso50_tr[] UCG_FONT_SECTION("ucg_font_logisoso50_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso54_tf[] UCG_FONT_SECTION("ucg_font_logisoso54_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso54_tn[] UCG_FONT_SECTION("ucg_font_logisoso54_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso54_tr[] UCG_FONT_SECTION("ucg_font_logisoso54_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso58_tf[] UCG_FONT_SECTION("ucg_font_logisoso58_tf");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso58_tn[] UCG_FONT_SECTION("ucg_font_logisoso58_tn");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso58_tr[] UCG_FONT_SECTION("ucg_font_logisoso58_tr");
extern const ucg_fntpgm_uint8_t ucg_font_logisoso62_tn[] UCG_FONT_SECTION("ucg_font_logisoso62_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osb18_hf[] UCG_FONT_SECTION("ucg_font_osb18_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osb18_hn[] UCG_FONT_SECTION("ucg_font_osb18_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osb18_hr[] UCG_FONT_SECTION("ucg_font_osb18_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osb18_tf[] UCG_FONT_SECTION("ucg_font_osb18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osb18_tn[] UCG_FONT_SECTION("ucg_font_osb18_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osb18_tr[] UCG_FONT_SECTION("ucg_font_osb18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osb21_hf[] UCG_FONT_SECTION("ucg_font_osb21_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osb21_hn[] UCG_FONT_SECTION("ucg_font_osb21_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osb21_hr[] UCG_FONT_SECTION("ucg_font_osb21_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osb21_tf[] UCG_FONT_SECTION("ucg_font_osb21_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osb21_tn[] UCG_FONT_SECTION("ucg_font_osb21_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osb21_tr[] UCG_FONT_SECTION("ucg_font_osb21_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osb26_hf[] UCG_FONT_SECTION("ucg_font_osb26_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osb26_hn[] UCG_FONT_SECTION("ucg_font_osb26_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osb26_hr[] UCG_FONT_SECTION("ucg_font_osb26_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osb26_tf[] UCG_FONT_SECTION("ucg_font_osb26_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osb26_tn[] UCG_FONT_SECTION("ucg_font_osb26_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osb26_tr[] UCG_FONT_SECTION("ucg_font_osb26_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osb29_hf[] UCG_FONT_SECTION("ucg_font_osb29_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osb29_hn[] UCG_FONT_SECTION("ucg_font_osb29_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osb29_hr[] UCG_FONT_SECTION("ucg_font_osb29_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osb29_tf[] UCG_FONT_SECTION("ucg_font_osb29_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osb29_tn[] UCG_FONT_SECTION("ucg_font_osb29_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osb29_tr[] UCG_FONT_SECTION("ucg_font_osb29_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osb35_hf[] UCG_FONT_SECTION("ucg_font_osb35_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osb35_hn[] UCG_FONT_SECTION("ucg_font_osb35_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osb35_hr[] UCG_FONT_SECTION("ucg_font_osb35_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osb35_tf[] UCG_FONT_SECTION("ucg_font_osb35_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osb35_tn[] UCG_FONT_SECTION("ucg_font_osb35_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osb35_tr[] UCG_FONT_SECTION("ucg_font_osb35_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osb41_hf[] UCG_FONT_SECTION("ucg_font_osb41_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osb41_hn[] UCG_FONT_SECTION("ucg_font_osb41_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osb41_hr[] UCG_FONT_SECTION("ucg_font_osb41_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osb41_tf[] UCG_FONT_SECTION("ucg_font_osb41_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osb41_tn[] UCG_FONT_SECTION("ucg_font_osb41_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osb41_tr[] UCG_FONT_SECTION("ucg_font_osb41_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osr18_hf[] UCG_FONT_SECTION("ucg_font_osr18_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osr18_hn[] UCG_FONT_SECTION("ucg_font_osr18_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osr18_hr[] UCG_FONT_SECTION("ucg_font_osr18_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osr18_tf[] UCG_FONT_SECTION("ucg_font_osr18_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osr18_tn[] UCG_FONT_SECTION("ucg_font_osr18_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osr18_tr[] UCG_FONT_SECTION("ucg_font_osr18_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osr21_hf[] UCG_FONT_SECTION("ucg_font_osr21_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osr21_hn[] UCG_FONT_SECTION("ucg_font_osr21_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osr21_hr[] UCG_FONT_SECTION("ucg_font_osr21_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osr21_tf[] UCG_FONT_SECTION("ucg_font_osr21_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osr21_tn[] UCG_FONT_SECTION("ucg_font_osr21_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osr21_tr[] UCG_FONT_SECTION("ucg_font_osr21_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osr26_hf[] UCG_FONT_SECTION("ucg_font_osr26_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osr26_hn[] UCG_FONT_SECTION("ucg_font_osr26_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osr26_hr[] UCG_FONT_SECTION("ucg_font_osr26_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osr26_tf[] UCG_FONT_SECTION("ucg_font_osr26_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osr26_tn[] UCG_FONT_SECTION("ucg_font_osr26_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osr26_tr[] UCG_FONT_SECTION("ucg_font_osr26_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osr29_hf[] UCG_FONT_SECTION("ucg_font_osr29_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osr29_hn[] UCG_FONT_SECTION("ucg_font_osr29_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osr29_hr[] UCG_FONT_SECTION("ucg_font_osr29_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osr29_tf[] UCG_FONT_SECTION("ucg_font_osr29_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osr29_tn[] UCG_FONT_SECTION("ucg_font_osr29_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osr29_tr[] UCG_FONT_SECTION("ucg_font_osr29_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osr35_hf[] UCG_FONT_SECTION("ucg_font_osr35_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osr35_hn[] UCG_FONT_SECTION("ucg_font_osr35_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osr35_hr[] UCG_FONT_SECTION("ucg_font_osr35_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osr35_tf[] UCG_FONT_SECTION("ucg_font_osr35_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osr35_tn[] UCG_FONT_SECTION("ucg_font_osr35_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osr35_tr[] UCG_FONT_SECTION("ucg_font_osr35_tr");
extern const ucg_fntpgm_uint8_t ucg_font_osr41_hf[] UCG_FONT_SECTION("ucg_font_osr41_hf");
extern const ucg_fntpgm_uint8_t ucg_font_osr41_hn[] UCG_FONT_SECTION("ucg_font_osr41_hn");
extern const ucg_fntpgm_uint8_t ucg_font_osr41_hr[] UCG_FONT_SECTION("ucg_font_osr41_hr");
extern const ucg_fntpgm_uint8_t ucg_font_osr41_tf[] UCG_FONT_SECTION("ucg_font_osr41_tf");
extern const ucg_fntpgm_uint8_t ucg_font_osr41_tn[] UCG_FONT_SECTION("ucg_font_osr41_tn");
extern const ucg_fntpgm_uint8_t ucg_font_osr41_tr[] UCG_FONT_SECTION("ucg_font_osr41_tr");
#endif
#ifdef __cplusplus
}
#endif
#endif /* _UCG_H */
/*
ucg_bitmap.c
Universal uC Color Graphics Library
Copyright (c) 2013, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ucg.h"
#ifdef UCG_MSG_DRAW_L90TC
void ucg_DrawTransparentBitmapLine(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t dir, ucg_int_t len, const unsigned char *bitmap)
{
ucg->arg.pixel.rgb.color[0] = ucg->arg.rgb[0].color[0];
ucg->arg.pixel.rgb.color[1] = ucg->arg.rgb[0].color[1];
ucg->arg.pixel.rgb.color[2] = ucg->arg.rgb[0].color[2];
ucg->arg.pixel.pos.x = x;
ucg->arg.pixel.pos.y = y;
ucg->arg.dir = dir;
ucg->arg.len = len;
ucg->arg.bitmap = bitmap;
ucg->arg.pixel_skip = 0;
ucg_DrawL90TCWithArg(ucg);
}
#endif /* UCG_MSG_DRAW_L90TC */
#ifdef UCG_MSG_DRAW_L90BF
void ucg_DrawBitmapLine(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t dir, ucg_int_t len, const unsigned char *bitmap)
{
/*
ucg->arg.pixel.rgb.color[0] = ucg->arg.rgb[0].color[0];
ucg->arg.pixel.rgb.color[1] = ucg->arg.rgb[0].color[1];
ucg->arg.pixel.rgb.color[2] = ucg->arg.rgb[0].color[2];
*/
ucg->arg.pixel.pos.x = x;
ucg->arg.pixel.pos.y = y;
ucg->arg.dir = dir;
ucg->arg.len = len;
ucg->arg.bitmap = bitmap;
ucg->arg.pixel_skip = 0;
//ucg->arg.scale = 0;
ucg_DrawL90BFWithArg(ucg);
}
#endif /* UCG_MSG_DRAW_L90BF */
#ifdef ON_HOLD
void ucg_DrawRLBitmap(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t dir, const unsigned char *rl_bitmap)
{
ucg->arg.pixel.rgb.color[0] = ucg->arg.rgb[0].color[0];
ucg->arg.pixel.rgb.color[1] = ucg->arg.rgb[0].color[1];
ucg->arg.pixel.rgb.color[2] = ucg->arg.rgb[0].color[2];
ucg->arg.pixel.pos.x = x;
ucg->arg.pixel.pos.y = y;
ucg->arg.dir = dir;
ucg->arg.len = 0;
ucg->arg.bitmap = rl_bitmap;
ucg_DrawL90RLWithArg(ucg);
}
#endif
/*
ucg_box.c
Universal uC Color Graphics Library
Copyright (c) 2013, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ucg.h"
void ucg_DrawBox(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h)
{
while( h > 0 )
{
ucg_DrawHLine(ucg, x, y, w);
h--;
y++;
}
}
/*
- clear the screen with black color
- reset clip range to max
- set draw color to white
*/
void ucg_ClearScreen(ucg_t *ucg)
{
ucg_SetColor(ucg, 0, 0, 0, 0);
ucg_SetMaxClipRange(ucg);
ucg_DrawBox(ucg, 0, 0, ucg_GetWidth(ucg), ucg_GetHeight(ucg));
ucg_SetColor(ucg, 0, 255, 255, 255);
}
void ucg_DrawRBox(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h, ucg_int_t r)
{
ucg_int_t xl, yu;
ucg_int_t yl, xr;
xl = x;
xl += r;
yu = y;
yu += r;
xr = x;
xr += w;
xr -= r;
xr -= 1;
yl = y;
yl += h;
yl -= r;
yl -= 1;
ucg_DrawDisc(ucg, xl, yu, r, UCG_DRAW_UPPER_LEFT);
ucg_DrawDisc(ucg, xr, yu, r, UCG_DRAW_UPPER_RIGHT);
ucg_DrawDisc(ucg, xl, yl, r, UCG_DRAW_LOWER_LEFT);
ucg_DrawDisc(ucg, xr, yl, r, UCG_DRAW_LOWER_RIGHT);
{
ucg_int_t ww, hh;
ww = w;
ww -= r;
ww -= r;
ww -= 2;
hh = h;
hh -= r;
hh -= r;
hh -= 2;
xl++;
yu++;
h--;
ucg_DrawBox(ucg, xl, y, ww, r+1);
ucg_DrawBox(ucg, xl, yl, ww, r+1);
ucg_DrawBox(ucg, x, yu, w, hh);
}
}
ucg_ccs_t ucg_ccs_box[6]; /* color component sliders used by GradientBox */
void ucg_DrawGradientBox(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h)
{
uint8_t i;
/* Setup ccs for l90se. This will be updated by ucg_clip_l90se if required */
/* 8. Jan 2014: correct? */
//printf("%d %d %d\n", ucg->arg.rgb[3].color[0], ucg->arg.rgb[3].color[1], ucg->arg.rgb[3].color[2]);
for ( i = 0; i < 3; i++ )
{
ucg_ccs_init(ucg_ccs_box+i, ucg->arg.rgb[0].color[i], ucg->arg.rgb[2].color[i], h);
ucg_ccs_init(ucg_ccs_box+i+3, ucg->arg.rgb[1].color[i], ucg->arg.rgb[3].color[i], h);
}
while( h > 0 )
{
ucg->arg.rgb[0].color[0] = ucg_ccs_box[0].current;
ucg->arg.rgb[0].color[1] = ucg_ccs_box[1].current;
ucg->arg.rgb[0].color[2] = ucg_ccs_box[2].current;
ucg->arg.rgb[1].color[0] = ucg_ccs_box[3].current;
ucg->arg.rgb[1].color[1] = ucg_ccs_box[4].current;
ucg->arg.rgb[1].color[2] = ucg_ccs_box[5].current;
//printf("%d %d %d\n", ucg_ccs_box[0].current, ucg_ccs_box[1].current, ucg_ccs_box[2].current);
//printf("%d %d %d\n", ucg_ccs_box[3].current, ucg_ccs_box[4].current, ucg_ccs_box[5].current);
ucg->arg.pixel.pos.x = x;
ucg->arg.pixel.pos.y = y;
ucg->arg.len = w;
ucg->arg.dir = 0;
ucg_DrawL90SEWithArg(ucg);
for ( i = 0; i < 6; i++ )
ucg_ccs_step(ucg_ccs_box+i);
h--;
y++;
}
}
/* restrictions: w > 0 && h > 0 */
void ucg_DrawFrame(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h)
{
ucg_int_t xtmp = x;
ucg_DrawHLine(ucg, x, y, w);
ucg_DrawVLine(ucg, x, y, h);
x+=w;
x--;
ucg_DrawVLine(ucg, x, y, h);
y+=h;
y--;
ucg_DrawHLine(ucg, xtmp, y, w);
}
void ucg_DrawRFrame(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t w, ucg_int_t h, ucg_int_t r)
{
ucg_int_t xl, yu;
xl = x;
xl += r;
yu = y;
yu += r;
{
ucg_int_t yl, xr;
xr = x;
xr += w;
xr -= r;
xr -= 1;
yl = y;
yl += h;
yl -= r;
yl -= 1;
ucg_DrawCircle(ucg, xl, yu, r, UCG_DRAW_UPPER_LEFT);
ucg_DrawCircle(ucg, xr, yu, r, UCG_DRAW_UPPER_RIGHT);
ucg_DrawCircle(ucg, xl, yl, r, UCG_DRAW_LOWER_LEFT);
ucg_DrawCircle(ucg, xr, yl, r, UCG_DRAW_LOWER_RIGHT);
}
{
ucg_int_t ww, hh;
ww = w;
ww -= r;
ww -= r;
ww -= 2;
hh = h;
hh -= r;
hh -= r;
hh -= 2;
xl++;
yu++;
h--;
w--;
ucg_DrawHLine(ucg, xl, y, ww);
ucg_DrawHLine(ucg, xl, y+h, ww);
ucg_DrawVLine(ucg, x, yu, hh);
ucg_DrawVLine(ucg, x+w, yu, hh);
}
}
/*
ucg_ccs.c
color component slide sub library
Universal uC Color Graphics Library
Copyright (c) 2013, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
e: end
n: steps
f(0) = s
f(n) = e
f(x) = m*x + s
f(n-1) = m*(n-1) + s =!= e
--> m = (e-s)/n
f(x) = (e-s)/(n-1) * x + s
f(0) = s
f(1) = s + (e-s)/(n-1)
*/
#include "ucg.h"
/*
Setup change from "start" to "end" with a specified amount of "steps".
After calling this procedure, ccs->current will contain the "start" value.
*/
void ucg_ccs_init(ucg_ccs_t *ccs, uint8_t start, uint8_t end, ucg_int_t steps)
{
ccs->start = start;
ccs->num = end-start;
ccs->den = steps-1;
ccs->dir = 1;
ccs->quot = ccs->num / ccs->den;
if ( ccs->num < 0 )
{
ccs->num = -ccs->num;
ccs->dir = -1;
}
ccs->rem = ccs->num % ccs->den;
ccs->frac = ccs->den/2;
ccs->current = start;
}
/*
Make one step towards the "end" value.
ccs->curront will contain the updated value.
*/
void ucg_ccs_step(ucg_ccs_t *ccs)
{
ccs->current += ccs->quot;
ccs->frac += ccs->rem;
if ( ccs->frac >= ccs->den )
{
ccs->current += ccs->dir;
ccs->frac -= ccs->den;
}
}
/*
f(x) = (e-s)/(n-1) * x + s
current = (num / den) * (pos / den)
Seek to the specified "pos"ition.
"pos" must be between 0 and "end"-1
*/
void ucg_ccs_seek(ucg_ccs_t *ccs, ucg_int_t pos)
{
ucg_int_t p;
ccs->current = ccs->quot;
ccs->current *= pos;
p = ccs->rem * pos + ccs->den/2;
if ( ccs->dir >= 0 )
ccs->current += p / ccs->den;
else
ccs->current -= p / ccs->den;
ccs->frac = p % ccs->den;
ccs->current += ccs->start;
}
/*
ucg_circle.c
Circle Drawing Procedures
Universal uC Color Graphics Library
Copyright (c) 2014, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ucg.h"
static void ucg_draw_circle_section(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t x0, ucg_int_t y0, uint8_t option) UCG_NOINLINE;
static void ucg_draw_circle_section(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t x0, ucg_int_t y0, uint8_t option)
{
/* upper right */
if ( option & UCG_DRAW_UPPER_RIGHT )
{
ucg_DrawPixel(ucg, x0 + x, y0 - y);
ucg_DrawPixel(ucg, x0 + y, y0 - x);
}
/* upper left */
if ( option & UCG_DRAW_UPPER_LEFT )
{
ucg_DrawPixel(ucg, x0 - x, y0 - y);
ucg_DrawPixel(ucg, x0 - y, y0 - x);
}
/* lower right */
if ( option & UCG_DRAW_LOWER_RIGHT )
{
ucg_DrawPixel(ucg, x0 + x, y0 + y);
ucg_DrawPixel(ucg, x0 + y, y0 + x);
}
/* lower left */
if ( option & UCG_DRAW_LOWER_LEFT )
{
ucg_DrawPixel(ucg, x0 - x, y0 + y);
ucg_DrawPixel(ucg, x0 - y, y0 + x);
}
}
void ucg_draw_circle(ucg_t *ucg, ucg_int_t x0, ucg_int_t y0, ucg_int_t rad, uint8_t option)
{
ucg_int_t f;
ucg_int_t ddF_x;
ucg_int_t ddF_y;
ucg_int_t x;
ucg_int_t y;
f = 1;
f -= rad;
ddF_x = 1;
ddF_y = 0;
ddF_y -= rad;
ddF_y *= 2;
x = 0;
y = rad;
ucg_draw_circle_section(ucg, x, y, x0, y0, option);
while ( x < y )
{
if (f >= 0)
{
y--;
ddF_y += 2;
f += ddF_y;
}
x++;
ddF_x += 2;
f += ddF_x;
ucg_draw_circle_section(ucg, x, y, x0, y0, option);
}
}
void ucg_DrawCircle(ucg_t *ucg, ucg_int_t x0, ucg_int_t y0, ucg_int_t rad, uint8_t option)
{
/* check for bounding box */
/*
{
ucg_int_t radp, radp2;
radp = rad;
radp++;
radp2 = radp;
radp2 *= 2;
if ( ucg_IsBBXIntersection(ucg, x0-radp, y0-radp, radp2, radp2) == 0)
return;
}
*/
/* draw circle */
ucg_draw_circle(ucg, x0, y0, rad, option);
}
static void ucg_draw_disc_section(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t x0, ucg_int_t y0, uint8_t option) UCG_NOINLINE;
static void ucg_draw_disc_section(ucg_t *ucg, ucg_int_t x, ucg_int_t y, ucg_int_t x0, ucg_int_t y0, uint8_t option)
{
/* upper right */
if ( option & UCG_DRAW_UPPER_RIGHT )
{
ucg_DrawVLine(ucg, x0+x, y0-y, y+1);
ucg_DrawVLine(ucg, x0+y, y0-x, x+1);
}
/* upper left */
if ( option & UCG_DRAW_UPPER_LEFT )
{
ucg_DrawVLine(ucg, x0-x, y0-y, y+1);
ucg_DrawVLine(ucg, x0-y, y0-x, x+1);
}
/* lower right */
if ( option & UCG_DRAW_LOWER_RIGHT )
{
ucg_DrawVLine(ucg, x0+x, y0, y+1);
ucg_DrawVLine(ucg, x0+y, y0, x+1);
}
/* lower left */
if ( option & UCG_DRAW_LOWER_LEFT )
{
ucg_DrawVLine(ucg, x0-x, y0, y+1);
ucg_DrawVLine(ucg, x0-y, y0, x+1);
}
}
void ucg_draw_disc(ucg_t *ucg, ucg_int_t x0, ucg_int_t y0, ucg_int_t rad, uint8_t option)
{
ucg_int_t f;
ucg_int_t ddF_x;
ucg_int_t ddF_y;
ucg_int_t x;
ucg_int_t y;
f = 1;
f -= rad;
ddF_x = 1;
ddF_y = 0;
ddF_y -= rad;
ddF_y *= 2;
x = 0;
y = rad;
ucg_draw_disc_section(ucg, x, y, x0, y0, option);
while ( x < y )
{
if (f >= 0)
{
y--;
ddF_y += 2;
f += ddF_y;
}
x++;
ddF_x += 2;
f += ddF_x;
ucg_draw_disc_section(ucg, x, y, x0, y0, option);
}
}
void ucg_DrawDisc(ucg_t *ucg, ucg_int_t x0, ucg_int_t y0, ucg_int_t rad, uint8_t option)
{
/* check for bounding box */
/*
{
ucg_int_t radp, radp2;
radp = rad;
radp++;
radp2 = radp;
radp2 *= 2;
if ( ucg_IsBBXIntersection(ucg, x0-radp, y0-radp, radp2, radp2) == 0)
return;
}
*/
/* draw disc */
ucg_draw_disc(ucg, x0, y0, rad, option);
}
/*
ucg_clip.c
Clipping procedures for the device funktions
Universal uC Color Graphics Library
Copyright (c) 2013, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ucg.h"
static ucg_int_t ucg_clip_is_x_visible(ucg_t *ucg) UCG_NOINLINE;
static ucg_int_t ucg_clip_is_y_visible(ucg_t *ucg) UCG_NOINLINE;
static ucg_int_t ucg_clip_is_x_visible(ucg_t *ucg)
{
ucg_int_t t;
t = ucg->arg.pixel.pos.x;
t -= ucg->clip_box.ul.x;
if ( t < 0 )
return 0;
if ( t >= ucg->clip_box.size.w )
return 0;
return 1;
}
static ucg_int_t ucg_clip_is_y_visible(ucg_t *ucg)
{
ucg_int_t t;
t = ucg->arg.pixel.pos.y;
t -= ucg->clip_box.ul.y;
if ( t < 0 )
return 0;
if ( t >= ucg->clip_box.size.h )
return 0;
return 1;
}
/*
Description:
clip range from a (included) to b (excluded) agains c (included) to d (excluded)
Assumptions:
a <= b
c <= d
*/
static ucg_int_t ucg_clip_intersection(ucg_int_t *ap, ucg_int_t *bp, ucg_int_t c, ucg_int_t d)
{
ucg_int_t a = *ap;
ucg_int_t b = *bp;
if ( a >= d )
return 0;
if ( b <= c )
return 0;
if ( a < c )
*ap = c;
if ( b > d )
*bp = d;
return 1;
}
ucg_int_t ucg_clip_is_pixel_visible(ucg_t *ucg)
{
if ( ucg_clip_is_x_visible(ucg) == 0 )
return 0;
if ( ucg_clip_is_y_visible(ucg) == 0 )
return 0;
return 1;
}
/*
assumes, that ucg->arg contains data for l90fx and does clipping
against ucg->clip_box
*/
ucg_int_t ucg_clip_l90fx(ucg_t *ucg)
{
ucg_int_t a;
ucg_int_t b;
ucg->arg.offset = 0;
switch(ucg->arg.dir)
{
case 0:
if ( ucg_clip_is_y_visible(ucg) == 0 )
return 0;
a = ucg->arg.pixel.pos.x;
b = a;
b += ucg->arg.len;
if ( ucg_clip_intersection(&a, &b, ucg->clip_box.ul.x, ucg->clip_box.ul.x+ucg->clip_box.size.w) == 0 )
return 0;
ucg->arg.offset = a - ucg->arg.pixel.pos.x;
ucg->arg.pixel.pos.x = a;
b -= a;
ucg->arg.len = b;
break;
case 1:
if ( ucg_clip_is_x_visible(ucg) == 0 )
return 0;
a = ucg->arg.pixel.pos.y;
b = a;
b += ucg->arg.len;
if ( ucg_clip_intersection(&a, &b, ucg->clip_box.ul.y, ucg->clip_box.ul.y+ucg->clip_box.size.h) == 0 )
return 0;
ucg->arg.offset = a - ucg->arg.pixel.pos.y;
ucg->arg.pixel.pos.y = a;
b -= a;
ucg->arg.len = b;
break;
case 2:
if ( ucg_clip_is_y_visible(ucg) == 0 )
return 0;
b = ucg->arg.pixel.pos.x;
b++;
a = b;
a -= ucg->arg.len;
if ( ucg_clip_intersection(&a, &b, ucg->clip_box.ul.x, ucg->clip_box.ul.x+ucg->clip_box.size.w) == 0 )
return 0;
ucg->arg.len = b-a;
b--;
ucg->arg.offset = ucg->arg.pixel.pos.x-b;
ucg->arg.pixel.pos.x = b;
break;
case 3:
if ( ucg_clip_is_x_visible(ucg) == 0 )
return 0;
b = ucg->arg.pixel.pos.y;
b++;
a = b;
a -= ucg->arg.len;
if ( ucg_clip_intersection(&a, &b, ucg->clip_box.ul.y, ucg->clip_box.ul.y+ucg->clip_box.size.h) == 0 )
return 0;
ucg->arg.len = b-a;
b--;
ucg->arg.offset = ucg->arg.pixel.pos.y-b;
ucg->arg.pixel.pos.y = b;
break;
}
return 1;
}
ucg_int_t ucg_clip_l90tc(ucg_t *ucg)
{
if ( ucg_clip_l90fx(ucg) == 0 )
return 0;
ucg->arg.pixel_skip = ucg->arg.offset & 0x07;
ucg->arg.bitmap += (ucg->arg.offset >>3);
return 1;
}
/* old code
ucg_int_t ucg_clip_l90tc(ucg_t *ucg)
{
ucg_int_t t;
switch(ucg->arg.dir)
{
case 0:
t = ucg->arg.pixel.pos.x;
if ( ucg_clip_l90fx(ucg) == 0 )
return 0;
t = ucg->arg.pixel.pos.x - t;
break;
case 1:
t = ucg->arg.pixel.pos.y;
if ( ucg_clip_l90fx(ucg) == 0 )
return 0;
t = ucg->arg.pixel.pos.y - t;
break;
case 2:
t = ucg->arg.pixel.pos.x;
if ( ucg_clip_l90fx(ucg) == 0 )
return 0;
t -= ucg->arg.pixel.pos.x;
break;
case 3:
t = ucg->arg.pixel.pos.y;
if ( ucg_clip_l90fx(ucg) == 0 )
return 0;
t -= ucg->arg.pixel.pos.y;
break;
}
ucg->arg.pixel_skip = t & 0x07;
ucg->arg.bitmap += (t >>3);
return 1;
}
*/
ucg_int_t ucg_clip_l90se(ucg_t *ucg)
{
uint8_t i;
if ( ucg_clip_l90fx(ucg) == 0 )
return 0;
for ( i = 0; i < 3; i++ )
{
ucg_ccs_seek(ucg->arg.ccs_line+i, ucg->arg.offset);
}
return 1;
}
/*
ucg_com_msg_api.c
Universal uC Color Graphics Library
Copyright (c) 2014, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ucg.h"
int16_t ucg_com_template_cb(ucg_t *ucg, int16_t msg, uint32_t arg, uint8_t *data)
{
switch(msg)
{
case UCG_COM_MSG_POWER_UP:
break;
case UCG_COM_MSG_POWER_DOWN:
break;
case UCG_COM_MSG_DELAY:
break;
case UCG_COM_MSG_CHANGE_RESET_LINE:
break;
case UCG_COM_MSG_CHANGE_CS_LINE:
break;
case UCG_COM_MSG_CHANGE_CD_LINE:
break;
case UCG_COM_MSG_SEND_BYTE:
break;
case UCG_COM_MSG_REPEAT_1_BYTE:
break;
case UCG_COM_MSG_REPEAT_2_BYTES:
break;
case UCG_COM_MSG_REPEAT_3_BYTES:
break;
case UCG_COM_MSG_SEND_STR:
break;
case UCG_COM_MSG_SEND_CD_DATA_SEQUENCE:
break;
}
return 1;
}
void ucg_com_PowerDown(ucg_t *ucg)
{
if ( (ucg->com_status & UCG_COM_STATUS_MASK_POWER) != 0 )
ucg->com_cb(ucg, UCG_COM_MSG_POWER_DOWN, 0, NULL);
ucg->com_status &= ~UCG_COM_STATUS_MASK_POWER;
}
/*
clk_speed in nano-seconds, range: 0..4095
*/
int16_t ucg_com_PowerUp(ucg_t *ucg, uint16_t serial_clk_speed, uint16_t parallel_clk_speed)
{
int16_t r;
ucg_com_info_t com_info;
com_info.serial_clk_speed = serial_clk_speed;
com_info.parallel_clk_speed = parallel_clk_speed;
ucg_com_PowerDown(ucg);
ucg->com_initial_change_sent = 0;
r = ucg->com_cb(ucg, UCG_COM_MSG_POWER_UP, 0UL, (uint8_t *)&com_info);
if ( r != 0 )
{
ucg->com_status |= UCG_COM_STATUS_MASK_POWER;
}
return r;
}
void ucg_com_SetLineStatus(ucg_t *ucg, uint8_t level, uint8_t mask, uint8_t msg)
{
if ( level == 0 )
{
if ( (ucg->com_initial_change_sent & mask) == 0 || (ucg->com_status & mask) == mask )
{
ucg->com_cb(ucg, msg, level, NULL);
ucg->com_status &= ~mask;
ucg->com_initial_change_sent |= mask;
}
}
else
{
if ( (ucg->com_initial_change_sent & mask) == 0 || (ucg->com_status & mask) == 0 )
{
ucg->com_cb(ucg, msg, level, NULL);
ucg->com_status |= mask;
ucg->com_initial_change_sent |= mask;
}
}
}
void ucg_com_SetResetLineStatus(ucg_t *ucg, uint8_t level)
{
ucg_com_SetLineStatus(ucg, level, UCG_COM_STATUS_MASK_RESET, UCG_COM_MSG_CHANGE_RESET_LINE);
}
void ucg_com_SetCSLineStatus(ucg_t *ucg, uint8_t level)
{
ucg_com_SetLineStatus(ucg, level, UCG_COM_STATUS_MASK_CS, UCG_COM_MSG_CHANGE_CS_LINE);
}
void ucg_com_SetCDLineStatus(ucg_t *ucg, uint8_t level)
{
ucg_com_SetLineStatus(ucg, level, UCG_COM_STATUS_MASK_CD, UCG_COM_MSG_CHANGE_CD_LINE);
}
/* delay in microseconds */
void ucg_com_DelayMicroseconds(ucg_t *ucg, uint16_t delay)
{
ucg->com_cb(ucg, UCG_COM_MSG_DELAY, delay, NULL);
}
/* delay in milliseconds */
void ucg_com_DelayMilliseconds(ucg_t *ucg, uint16_t delay)
{
while( delay > 0 )
{
ucg_com_DelayMicroseconds(ucg, 1000);
delay--;
}
}
#ifndef ucg_com_SendByte
void ucg_com_SendByte(ucg_t *ucg, uint8_t byte)
{
ucg->com_cb(ucg, UCG_COM_MSG_SEND_BYTE, byte, NULL);
}
#endif
void ucg_com_SendRepeatByte(ucg_t *ucg, uint16_t cnt, uint8_t byte)
{
ucg->com_cb(ucg, UCG_COM_MSG_REPEAT_1_BYTE, cnt, &byte);
}
void ucg_com_SendRepeat2Bytes(ucg_t *ucg, uint16_t cnt, uint8_t *byte_ptr)
{
ucg->com_cb(ucg, UCG_COM_MSG_REPEAT_2_BYTES, cnt, byte_ptr);
}
#ifndef ucg_com_SendRepeat3Bytes
void ucg_com_SendRepeat3Bytes(ucg_t *ucg, uint16_t cnt, uint8_t *byte_ptr)
{
ucg->com_cb(ucg, UCG_COM_MSG_REPEAT_3_BYTES, cnt, byte_ptr);
}
#endif
void ucg_com_SendString(ucg_t *ucg, uint16_t cnt, const uint8_t *byte_ptr)
{
ucg->com_cb(ucg, UCG_COM_MSG_SEND_STR, cnt, (uint8_t *)byte_ptr);
}
void ucg_com_SendStringP(ucg_t *ucg, uint16_t cnt, const ucg_pgm_uint8_t *byte_ptr)
{
uint8_t b;
while( cnt > 0 )
{
b = ucg_pgm_read(byte_ptr);
//b = *byte_ptr;
ucg->com_cb(ucg, UCG_COM_MSG_SEND_BYTE, b, NULL);
byte_ptr++;
cnt--;
}
}
void ucg_com_SendCmdDataSequence(ucg_t *ucg, uint16_t cnt, const uint8_t *byte_ptr, uint8_t cd_line_status_at_end)
{
ucg->com_cb(ucg, UCG_COM_MSG_SEND_CD_DATA_SEQUENCE, cnt, (uint8_t *)byte_ptr);
ucg_com_SetCDLineStatus(ucg, cd_line_status_at_end); // ensure that the status is set correctly for the CD line */
}
/*
Command-Sequence Language
CMD10 1x CMD Byte, 0x Argument Data Bytes
CMD20 2x CMD Byte, 0x Argument Data Bytes
CMD11 1x CMD Byte, 1x Argument Data Bytes
CMD21 2x CMD Byte, 1x Argument Data Bytes
CMD12 1x CMD Byte, 2x Argument Data Bytes
CMD22 2x CMD Byte, 2x Argument Data Bytes
CMD13 1x CMD Byte, 3x Argument Data Bytes
CMD23 2x CMD Byte, 3x Argument Data Bytes
CMD14 1x CMD Byte, 4x Argument Data Bytes
CMD24 2x CMD Byte, 4x Argument Data Bytes
DATA1 1x Data Bytes
DATA2 2x Data Bytes
DATA3 3x Data Bytes
DATA4 4x Data Bytes
DATA5 5x Data Bytes
DATA6 6x Data Bytes
RST_LOW Output 0 on reset line
RST_HIGH Output 1 on reset line
CS_LOW Output 0 on chip select line
CS_HIGH Output 1 on chip select line
DLY_MS Delay for specified amount of milliseconds (0..2000)
DLY_US Delay for specified amount of microconds (0..2000)
Configuration
CFG_CD(c,a) Configure CMD/DATA line: "c" logic level CMD, "a" logic level CMD Args
0000xxxx End Marker
0001xxxx 1x CMD Byte, 0..15 Argument Data Bytes
0010xxxx 2x CMD Byte, 0..15 Argument Data Bytes
0011xxxx 3x CMD Byte, 0..15 Argument Data Bytes
0100xxxx
0101xxxx
0110xxxx Arg Bytes 0..15
0111xxxx Data Bytes 0...15
1000xxxx xxxxxxxx DLY MS
1001xxxx xxxxxxxx DLY US
1010sssss aaaaaaaa oooooooo (var0>>s)&a|o, send as argument
1011sssss aaaaaaaa oooooooo (var1>>s)&a|o, send as argument
1100xxxx
1101xxxx
1110xxxx
11110000 RST_LOW
11110001 RST_HIGH
1111001x
11110100 CS_LOW
11110101 CS_HIGH
1111011x
111110xx
111111ca CFG_CD(c,a)
#define C10(c0) 0x010, (c0)
#define C20(c0,c1) 0x020, (c0),(c1)
#define C11(c0,a0) 0x011, (c0),(a0)
#define C21(c0,c1,a0) 0x021, (c0),(c1),(a0)
#define C12(c0,a0,a1) 0x012, (c0),(a0),(a1)
#define C22(c0,c1,a0,a1) 0x022, (c0),(c1),(a0),(a1)
#define C13(c0,a0,a1,a2) 0x013, (c0),(a0),(a1),(a2)
#define C23(c0,c1,a0,a1,a2) 0x023, (c0),(c1),(a0),(a1),(a2)
#define C14(c0,a0,a1,a2,a3) 0x013, (c0),(a0),(a1),(a2),(a3)
#define C24(c0,c1,a0,a1,a2,a3) 0x023, (c0),(c1),(a0),(a1),(a2),(a3)
#define UCG_DATA() 0x070
#define D1(d0) 0x071, (d0)
#define D2(d0,d1) 0x072, (d0),(d1)
#define D3(d0,d1,d3) 0x073, (d0),(d1),(d2)
#define D4(d0,d1,d3,d4) 0x074, (d0),(d1),(d2),(d3)
#define D5(d0,d1,d3,d4,d5) 0x075, (d0),(d1),(d2),(d3),(d5)
#define D6(d0,d1,d3,d4,d5,d6) 0x076, (d0),(d1),(d2),(d3),(d5),(d6)
#define DLY_MS(t) 0x080 | (((t)>>8)&15), (t)&255
#define DLY_US(t) 0x090 | (((t)>>8)&15), (t)&255
s: Shift right
a: And mask
o: Or mask
#define UCG_VARX(s,a,o) 0x0a0 | ((s)&15), (a), (o)
#define UCG_VARY(s,a,o) 0x0b0 | ((s)&15), (a), (o)
#define RST(level) 0x0f0 | ((level)&1)
#define CS(level) 0x0f4 | ((level)&1)
#define CFG_CD(c,a) 0x0fc | (((c)&1)<<1) | ((a)&1)
#define END() 0x00
*/
static void ucg_com_SendCmdArg(ucg_t *ucg, const ucg_pgm_uint8_t *data, uint8_t cmd_cnt, uint8_t arg_cnt)
{
ucg_com_SetCDLineStatus(ucg, (ucg->com_cfg_cd>>1)&1 );
ucg_com_SendStringP(ucg, cmd_cnt, data);
if ( arg_cnt > 0 )
{
data += cmd_cnt;
ucg_com_SetCDLineStatus(ucg, (ucg->com_cfg_cd)&1 );
ucg_com_SendStringP(ucg, arg_cnt, data);
}
}
//void ucg_com_SendCmdSeq(ucg_t *ucg, const ucg_pgm_uint8_t *data)
void ucg_com_SendCmdSeq(ucg_t *ucg, const ucg_pgm_uint8_t *data)
{
uint8_t b;
uint8_t bb;
uint8_t hi;
uint8_t lo;
for(;;)
{
b = ucg_pgm_read(data);
//b = *data;
hi = (b) >> 4;
lo = (b) & 0x0f;
switch( hi )
{
case 0:
return; /* end marker */
case 1:
case 2:
case 3:
ucg_com_SendCmdArg(ucg, data+1, hi, lo);
data+=1+hi+lo;
break;
case 6:
ucg_com_SetCDLineStatus(ucg, (ucg->com_cfg_cd)&1 );
ucg_com_SendStringP(ucg, lo, data+1);
data+=1+lo;
break;
case 7: /* note: 0x070 is used to set data line status */
ucg_com_SetCDLineStatus(ucg, ((ucg->com_cfg_cd>>1)&1)^1 );
if ( lo > 0 )
ucg_com_SendStringP(ucg, lo, data+1);
data+=1+lo;
break;
case 8:
data++;
b = ucg_pgm_read(data);
//b = *data;
ucg_com_DelayMilliseconds(ucg, (((uint16_t)lo)<<8) + b );
data++;
break;
case 9:
data++;
b = ucg_pgm_read(data);
//b = *data;
ucg_com_DelayMicroseconds(ucg, (((uint16_t)lo)<<8) + b );
data++;
break;
case 10:
data++;
b = ucg_pgm_read(data);
data++;
bb = ucg_pgm_read(data);
data++;
//b = data[0];
//bb = data[1];
ucg_com_SetCDLineStatus(ucg, (ucg->com_cfg_cd)&1 );
ucg_com_SendByte(ucg, (((uint8_t)(((ucg->arg.pixel.pos.x)>>lo)))&b)|bb );
//data+=2;
break;
case 11:
data++;
b = ucg_pgm_read(data);
data++;
bb = ucg_pgm_read(data);
data++;
//b = data[0];
//bb = data[1];
ucg_com_SetCDLineStatus(ucg, (ucg->com_cfg_cd)&1 );
ucg_com_SendByte(ucg, (((uint8_t)(((ucg->arg.pixel.pos.y)>>lo)))&b)|bb );
//data+=2;
break;
case 15:
hi = lo >> 2;
lo &= 3;
switch(hi)
{
case 0:
ucg_com_SetResetLineStatus(ucg, lo&1);
break;
case 1:
ucg_com_SetCSLineStatus(ucg, lo&1);
break;
case 3:
ucg->com_cfg_cd = lo;
break;
}
data++;
break;
default:
return;
}
}
}
/*
ucg_dev_default_cb.c
Universal uC Color Graphics Library
Copyright (c) 2013, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ucg.h"
/*
default device callback
this should be (finally) called by any other device callback to handle
messages, which are not yet handled.
*/
ucg_int_t ucg_dev_default_cb(ucg_t *ucg, ucg_int_t msg, void *data)
{
switch(msg)
{
case UCG_MSG_DRAW_L90SE:
return ucg->ext_cb(ucg, msg, data);
case UCG_MSG_SET_CLIP_BOX:
ucg->clip_box = *(ucg_box_t *)data;
break;
}
return 1; /* all ok */
}
/*
will be used as default cb if no extentions callback is provided
*/
ucg_int_t ucg_ext_none(ucg_t *ucg, ucg_int_t msg, void *data)
{
return 1; /* all ok */
}
/*
handle UCG_MSG_DRAW_L90FX message and make calls to "dev_cb" with UCG_MSG_DRAW_PIXEL
return 1 if something has been drawn
*/
ucg_int_t ucg_handle_l90fx(ucg_t *ucg, ucg_dev_fnptr dev_cb)
{
if ( ucg_clip_l90fx(ucg) != 0 )
{
ucg_int_t dx, dy;
ucg_int_t i;
switch(ucg->arg.dir)
{
case 0: dx = 1; dy = 0; break;
case 1: dx = 0; dy = 1; break;
case 2: dx = -1; dy = 0; break;
case 3: dx = 0; dy = -1; break;
default: dx = 1; dy = 0; break; /* avoid compiler warning */
}
for( i = 0; i < ucg->arg.len; i++ )
{
dev_cb(ucg, UCG_MSG_DRAW_PIXEL, NULL);
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
}
return 1;
}
return 0;
}
/*
handle UCG_MSG_DRAW_L90TC message and make calls to "dev_cb" with UCG_MSG_DRAW_PIXEL
return 1 if something has been drawn
*/
ucg_int_t ucg_handle_l90tc(ucg_t *ucg, ucg_dev_fnptr dev_cb)
{
if ( ucg_clip_l90tc(ucg) != 0 )
{
ucg_int_t dx, dy;
ucg_int_t i;
unsigned char pixmap;
uint8_t bitcnt;
switch(ucg->arg.dir)
{
case 0: dx = 1; dy = 0; break;
case 1: dx = 0; dy = 1; break;
case 2: dx = -1; dy = 0; break;
case 3: dx = 0; dy = -1; break;
default: dx = 1; dy = 0; break; /* avoid compiler warning */
}
//pixmap = *(ucg->arg.bitmap);
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = ucg->arg.pixel_skip;
pixmap <<= bitcnt;
for( i = 0; i < ucg->arg.len; i++ )
{
if ( (pixmap & 128) != 0 )
{
dev_cb(ucg, UCG_MSG_DRAW_PIXEL, NULL);
}
pixmap<<=1;
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
bitcnt++;
if ( bitcnt >= 8 )
{
ucg->arg.bitmap++;
//pixmap = *(ucg->arg.bitmap);
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = 0;
}
}
return 1;
}
return 0;
}
/*
handle UCG_MSG_DRAW_L90FB message and make calls to "dev_cb" with UCG_MSG_DRAW_PIXEL
return 1 if something has been drawn
*/
ucg_int_t ucg_handle_l90bf(ucg_t *ucg, ucg_dev_fnptr dev_cb)
{
if ( ucg_clip_l90tc(ucg) != 0 )
{
ucg_int_t dx, dy;
ucg_int_t i, y;
unsigned char pixmap;
uint8_t bitcnt;
switch(ucg->arg.dir)
{
case 0: dx = 1; dy = 0; break;
case 1: dx = 0; dy = 1; break;
case 2: dx = -1; dy = 0; break;
case 3: dx = 0; dy = -1; break;
default: dx = 1; dy = 0; break; /* avoid compiler warning */
}
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = ucg->arg.pixel_skip;
pixmap <<= bitcnt;
for( i = 0; i < ucg->arg.len; i++ )
{
for( y = 0; y < ucg->arg.scale; y++ )
{
if ( (pixmap & 128) == 0 )
{
ucg->arg.pixel.rgb = ucg->arg.rgb[1];
dev_cb(ucg, UCG_MSG_DRAW_PIXEL, NULL);
}
else
{
ucg->arg.pixel.rgb = ucg->arg.rgb[0];
dev_cb(ucg, UCG_MSG_DRAW_PIXEL, NULL);
}
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
}
pixmap<<=1;
bitcnt++;
if ( bitcnt >= 8 )
{
ucg->arg.bitmap++;
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = 0;
}
}
return 1;
}
return 0;
}
/*
handle UCG_MSG_DRAW_L90SE message and make calls to "dev_cb" with UCG_MSG_DRAW_PIXEL
return 1 if something has been drawn
*/
ucg_int_t ucg_handle_l90se(ucg_t *ucg, ucg_dev_fnptr dev_cb)
{
uint8_t i;
/* Setup ccs for l90se. This will be updated by ucg_clip_l90se if required */
for ( i = 0; i < 3; i++ )
{
ucg_ccs_init(ucg->arg.ccs_line+i, ucg->arg.rgb[0].color[i], ucg->arg.rgb[1].color[i], ucg->arg.len);
}
/* check if the line is visible */
if ( ucg_clip_l90se(ucg) != 0 )
{
ucg_int_t dx, dy;
ucg_int_t i, j;
switch(ucg->arg.dir)
{
case 0: dx = 1; dy = 0; break;
case 1: dx = 0; dy = 1; break;
case 2: dx = -1; dy = 0; break;
case 3: dx = 0; dy = -1; break;
default: dx = 1; dy = 0; break; /* avoid compiler warning */
}
for( i = 0; i < ucg->arg.len; i++ )
{
ucg->arg.pixel.rgb.color[0] = ucg->arg.ccs_line[0].current;
ucg->arg.pixel.rgb.color[1] = ucg->arg.ccs_line[1].current;
ucg->arg.pixel.rgb.color[2] = ucg->arg.ccs_line[2].current;
dev_cb(ucg, UCG_MSG_DRAW_PIXEL, NULL);
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
for ( j = 0; j < 3; j++ )
{
ucg_ccs_step(ucg->arg.ccs_line+j);
}
}
return 1;
}
return 0;
}
/*
l90rl run lenth encoded constant color pattern
yyllllll wwwwbbbb wwwwbbbb wwwwbbbb wwwwbbbb ...
sequence terminates if wwwwbbbb = 0
wwww: number of pixel to skip
bbbb: number of pixel to draw with color
llllll: number of bytes which follow, can be 0
*/
#ifdef ON_HOLD
void ucg_handle_l90rl(ucg_t *ucg, ucg_dev_fnptr dev_cb)
{
ucg_int_t dx, dy;
uint8_t i, cnt;
uint8_t rl_code;
ucg_int_t skip;
switch(ucg->arg.dir)
{
case 0: dx = 1; dy = 0; break;
case 1: dx = 0; dy = 1; break;
case 2: dx = -1; dy = 0; break;
case 3: dx = 0; dy = -1; break;
default: dx = 1; dy = 0; break; /* avoid compiler warning */
}
cnt = ucg_pgm_read(ucg->arg.bitmap);
cnt &= 63;
ucg->arg.bitmap++;
for( i = 0; i < cnt; i++ )
{
rl_code = ucg_pgm_read(ucg->arg.bitmap);
if ( rl_code == 0 )
break;
skip = (ucg_int_t)(rl_code >> 4);
switch(ucg->arg.dir)
{
case 0: ucg->arg.pixel.pos.x+=skip; break;
case 1: ucg->arg.pixel.pos.y+=skip; break;
case 2: ucg->arg.pixel.pos.x-=skip; break;
default:
case 3: ucg->arg.pixel.pos.y-=skip; break;
}
rl_code &= 15;
while( rl_code )
{
dev_cb(ucg, UCG_MSG_DRAW_PIXEL, NULL);
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
rl_code--;
}
ucg->arg.bitmap++;
}
}
#endif
\ No newline at end of file
/*
ucg_dev_ic_ili9163.c
Specific code for the ili9163 controller (TFT displays)
Code is for 128x128 display which is shifted by 32 pixel within the controller RAM
Universal uC Color Graphics Library
Copyright (c) 2015, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ucg.h"
const ucg_pgm_uint8_t ucg_ili9163_set_pos_seq[] =
{
UCG_CS(0), /* enable chip */
UCG_C11( 0x036, 0x008),
UCG_C10(0x02a), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), UCG_D2(0x000, 0x07f), /* set x position */
UCG_C10(0x02b), UCG_VARY(0,0x00, 0), UCG_VARY(0,0x0ff, 0), UCG_D2(0x000, 0x0a1), /* set y position */
UCG_C10(0x02c), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
const ucg_pgm_uint8_t ucg_ili9163_set_pos_dir0_seq[] =
{
UCG_CS(0), /* enable chip */
/* 0x008 horizontal increment (dir = 0) */
/* 0x008 vertical increment (dir = 1) */
/* 0x048 horizontal deccrement (dir = 2) */
/* 0x088 vertical deccrement (dir = 3) */
UCG_C11( 0x036, 0x008),
UCG_C10(0x02a), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), UCG_D2(0x000, 0x083), /* set x position */
UCG_C10(0x02b), UCG_VARY(0,0x00, 0), UCG_VARY(0,0x0ff, 0), UCG_D2(0x000, 0x0a1), /* set y position */
UCG_C10(0x02c), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
const ucg_pgm_uint8_t ucg_ili9163_set_pos_dir1_seq[] =
{
UCG_CS(0), /* enable chip */
/* 0x008 horizontal increment (dir = 0) */
/* 0x008 vertical increment (dir = 1) */
/* 0x048 horizontal deccrement (dir = 2) */
/* 0x088 vertical deccrement (dir = 3) */
UCG_C11( 0x036, 0x008),
UCG_C10(0x02a), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x02b), UCG_VARY(0,0x00, 0), UCG_VARY(0,0x0ff, 0), UCG_D2(0x000, 0x0a1), /* set y position */
UCG_C10(0x02c), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
const ucg_pgm_uint8_t ucg_ili9163_set_pos_dir2_seq[] =
{
UCG_CS(0), /* enable chip */
/* 0x008 horizontal increment (dir = 0) */
/* 0x008 vertical increment (dir = 1) */
/* 0x048 horizontal deccrement (dir = 2) */
/* 0x088 vertical deccrement (dir = 3) */
UCG_C11( 0x036, 0x048),
UCG_C11( 0x036, 0x048), /* it seems that this command needs to be sent twice */
UCG_C10(0x02a), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), UCG_D2(0x000, 0x083), /* set x position */
UCG_C10(0x02b), UCG_VARY(0,0x00, 0), UCG_VARY(0,0x0ff, 0), UCG_D2(0x000, 0x0a1), /* set y position */
UCG_C10(0x02c), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
const ucg_pgm_uint8_t ucg_ili9163_set_pos_dir3_seq[] =
{
UCG_CS(0), /* enable chip */
/* 0x008 horizontal increment (dir = 0) */
/* 0x008 vertical increment (dir = 1) */
/* 0x0c8 horizontal deccrement (dir = 2) */
/* 0x0c8 vertical deccrement (dir = 3) */
UCG_C11( 0x036, 0x088),
UCG_C11( 0x036, 0x088), /* it seems that this command needs to be sent twice */
UCG_C10(0x02a), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x02b), UCG_VARY(0,0x00, 0), UCG_VARY(0,0x0ff, 0), UCG_D2(0x000, 0x0a1), /* set y position */
UCG_C10(0x02c), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
ucg_int_t ucg_handle_ili9163_l90fx(ucg_t *ucg)
{
uint8_t c[3];
ucg_int_t tmp;
if ( ucg_clip_l90fx(ucg) != 0 )
{
switch(ucg->arg.dir)
{
case 0:
ucg->arg.pixel.pos.y += 32;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_dir0_seq);
ucg->arg.pixel.pos.y -= 32;
break;
case 1:
ucg->arg.pixel.pos.y += 32;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_dir1_seq);
ucg->arg.pixel.pos.y -= 32;
break;
case 2:
tmp = ucg->arg.pixel.pos.x;
ucg->arg.pixel.pos.x = 127-tmp;
ucg->arg.pixel.pos.y += 32;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_dir2_seq);
ucg->arg.pixel.pos.y -= 32;
ucg->arg.pixel.pos.x = tmp;
break;
case 3:
default:
tmp = ucg->arg.pixel.pos.y;
ucg->arg.pixel.pos.y = 127-tmp;
//ucg->arg.pixel.pos.y += 32;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_dir3_seq);
ucg->arg.pixel.pos.y = tmp;
break;
}
c[0] = ucg->arg.pixel.rgb.color[0];
c[1] = ucg->arg.pixel.rgb.color[1];
c[2] = ucg->arg.pixel.rgb.color[2];
ucg_com_SendRepeat3Bytes(ucg, ucg->arg.len, c);
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
/*
L2TC (Glyph Output)
*/
/* with CmdDataSequence */
ucg_int_t ucg_handle_ili9163_l90tc(ucg_t *ucg)
{
if ( ucg_clip_l90tc(ucg) != 0 )
{
uint8_t buf[16];
ucg_int_t dx, dy;
ucg_int_t i;
unsigned char pixmap;
uint8_t bitcnt;
ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
ucg->arg.pixel.pos.y += 32;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_seq);
buf[0] = 0x001; // change to 0 (cmd mode)
buf[1] = 0x02a; // set x
buf[2] = 0x002; // change to 1 (arg mode)
buf[3] = 0x000; // upper part x
buf[4] = 0x000; // no change
buf[5] = 0x000; // will be overwritten by x value
buf[6] = 0x001; // change to 0 (cmd mode)
buf[7] = 0x02c; // write data
buf[8] = 0x002; // change to 1 (data mode)
buf[9] = 0x000; // red value
buf[10] = 0x000; // no change
buf[11] = 0x000; // green value
buf[12] = 0x000; // no change
buf[13] = 0x000; // blue value
switch(ucg->arg.dir)
{
case 0:
dx = 1; dy = 0;
buf[1] = 0x02a; // set x
break;
case 1:
dx = 0; dy = 1;
buf[1] = 0x02b; // set y
break;
case 2:
dx = -1; dy = 0;
buf[1] = 0x02a; // set x
break;
case 3:
default:
dx = 0; dy = -1;
buf[1] = 0x02b; // set y
break;
}
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = ucg->arg.pixel_skip;
pixmap <<= bitcnt;
buf[9] = ucg->arg.pixel.rgb.color[0];
buf[11] = ucg->arg.pixel.rgb.color[1];
buf[13] = ucg->arg.pixel.rgb.color[2];
//ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
for( i = 0; i < ucg->arg.len; i++ )
{
if ( (pixmap & 128) != 0 )
{
if ( (ucg->arg.dir&1) == 0 )
{
buf[5] = ucg->arg.pixel.pos.x;
}
else
{
buf[3] = ucg->arg.pixel.pos.y>>8;
buf[5] = ucg->arg.pixel.pos.y&255;
}
ucg_com_SendCmdDataSequence(ucg, 7, buf, 0);
}
pixmap<<=1;
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
bitcnt++;
if ( bitcnt >= 8 )
{
ucg->arg.bitmap++;
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = 0;
}
}
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
ucg_int_t ucg_handle_ili9163_l90se(ucg_t *ucg)
{
uint8_t i;
uint8_t c[3];
ucg_int_t tmp;
/* Setup ccs for l90se. This will be updated by ucg_clip_l90se if required */
for ( i = 0; i < 3; i++ )
{
ucg_ccs_init(ucg->arg.ccs_line+i, ucg->arg.rgb[0].color[i], ucg->arg.rgb[1].color[i], ucg->arg.len);
}
/* check if the line is visible */
if ( ucg_clip_l90se(ucg) != 0 )
{
ucg_int_t i;
switch(ucg->arg.dir)
{
case 0:
ucg->arg.pixel.pos.y += 32;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_dir0_seq);
ucg->arg.pixel.pos.y -= 32;
break;
case 1:
ucg->arg.pixel.pos.y += 32;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_dir1_seq);
ucg->arg.pixel.pos.y -= 32;
break;
case 2:
tmp = ucg->arg.pixel.pos.x;
ucg->arg.pixel.pos.x = 127-tmp;
ucg->arg.pixel.pos.y += 32;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_dir2_seq);
ucg->arg.pixel.pos.y -= 32;
ucg->arg.pixel.pos.x = tmp;
break;
case 3:
default:
tmp = ucg->arg.pixel.pos.y;
ucg->arg.pixel.pos.y = 127-tmp;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_dir3_seq);
ucg->arg.pixel.pos.y = tmp;
break;
}
for( i = 0; i < ucg->arg.len; i++ )
{
c[0] = ucg->arg.ccs_line[0].current;
c[1] = ucg->arg.ccs_line[1].current;
c[2] = ucg->arg.ccs_line[2].current;
ucg_com_SendRepeat3Bytes(ucg, 1, c);
ucg_ccs_step(ucg->arg.ccs_line+0);
ucg_ccs_step(ucg->arg.ccs_line+1);
ucg_ccs_step(ucg->arg.ccs_line+2);
}
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
static const ucg_pgm_uint8_t ucg_ili9163_power_down_seq[] = {
UCG_CS(0), /* enable chip */
UCG_C10(0x010), /* sleep in */
UCG_C10(0x28), /* display off */
UCG_CS(1), /* disable chip */
UCG_END(), /* end of sequence */
};
ucg_int_t ucg_dev_ic_ili9163_18(ucg_t *ucg, ucg_int_t msg, void *data)
{
switch(msg)
{
case UCG_MSG_DEV_POWER_UP:
/* setup com interface and provide information on the clock speed */
/* of the serial and parallel interface. Values are nanoseconds. */
return ucg_com_PowerUp(ucg, 100, 66);
case UCG_MSG_DEV_POWER_DOWN:
ucg_com_SendCmdSeq(ucg, ucg_ili9163_power_down_seq);
return 1;
case UCG_MSG_GET_DIMENSION:
((ucg_wh_t *)data)->w = 128;
((ucg_wh_t *)data)->h = 128;
return 1;
case UCG_MSG_DRAW_PIXEL:
if ( ucg_clip_is_pixel_visible(ucg) !=0 )
{
uint8_t c[3];
ucg->arg.pixel.pos.y += 32;
ucg_com_SendCmdSeq(ucg, ucg_ili9163_set_pos_seq);
ucg->arg.pixel.pos.y -= 32;
c[0] = ucg->arg.pixel.rgb.color[0];
c[1] = ucg->arg.pixel.rgb.color[1];
c[2] = ucg->arg.pixel.rgb.color[2];
ucg_com_SendRepeat3Bytes(ucg, 1, c);
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
}
return 1;
case UCG_MSG_DRAW_L90FX:
//ucg_handle_l90fx(ucg, ucg_dev_ic_ili9163_18);
ucg_handle_ili9163_l90fx(ucg);
return 1;
#ifdef UCG_MSG_DRAW_L90TC
case UCG_MSG_DRAW_L90TC:
//ucg_handle_l90tc(ucg, ucg_dev_ic_ili9163_18);
ucg_handle_ili9163_l90tc(ucg);
return 1;
#endif /* UCG_MSG_DRAW_L90TC */
#ifdef UCG_MSG_DRAW_L90BF
case UCG_MSG_DRAW_L90BF:
ucg_handle_l90bf(ucg, ucg_dev_ic_ili9163_18);
return 1;
#endif /* UCG_MSG_DRAW_L90BF */
/* msg UCG_MSG_DRAW_L90SE is handled by ucg_dev_default_cb */
/*
case UCG_MSG_DRAW_L90SE:
return ucg->ext_cb(ucg, msg, data);
*/
}
return ucg_dev_default_cb(ucg, msg, data);
}
ucg_int_t ucg_ext_ili9163_18(ucg_t *ucg, ucg_int_t msg, void *data)
{
switch(msg)
{
case UCG_MSG_DRAW_L90SE:
//ucg_handle_l90se(ucg, ucg_dev_ic_ili9163_18);
ucg_handle_ili9163_l90se(ucg);
break;
}
return 1;
}
\ No newline at end of file
/*
ucg_dev_ic_ili9325.c
Specific code for the ili9325 controller (TFT displays)
Universal uC Color Graphics Library
Copyright (c) 2014, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ucg.h"
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_seq[] =
{
UCG_CS(0), /* enable chip */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_dir0_seq[] =
{
UCG_CS(0), /* enable chip */
/* last byte: 0x030 horizontal increment (dir = 0) */
/* last byte: 0x038 vertical increment (dir = 1) */
/* last byte: 0x000 horizontal deccrement (dir = 2) */
/* last byte: 0x008 vertical deccrement (dir = 3) */
UCG_C22(0x000, 0x003, 0xc0 | 0x010, 0x030), /* Entry Mode, GRAM write direction and BGR (Bit 12)=1, set TRI (Bit 15) and DFM (Bit 14) --> three byte transfer */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_dir1_seq[] =
{
UCG_CS(0), /* enable chip */
/* last byte: 0x030 horizontal increment (dir = 0) */
/* last byte: 0x038 vertical increment (dir = 1) */
/* last byte: 0x000 horizontal deccrement (dir = 2) */
/* last byte: 0x008 vertical deccrement (dir = 3) */
UCG_C22(0x000, 0x003, 0xc0 | 0x010, 0x038), /* Entry Mode, GRAM write direction and BGR (Bit 12)=1, set TRI (Bit 15) and DFM (Bit 14) --> three byte transfer */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_dir2_seq[] =
{
UCG_CS(0), /* enable chip */
/* last byte: 0x030 horizontal increment (dir = 0) */
/* last byte: 0x038 vertical increment (dir = 1) */
/* last byte: 0x000 horizontal deccrement (dir = 2) */
/* last byte: 0x008 vertical deccrement (dir = 3) */
UCG_C22(0x000, 0x003, 0xc0 | 0x010, 0x000), /* Entry Mode, GRAM write direction and BGR (Bit 12)=1, set TRI (Bit 15) and DFM (Bit 14) --> three byte transfer */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_dir3_seq[] =
{
UCG_CS(0), /* enable chip */
/* last byte: 0x030 horizontal increment (dir = 0) */
/* last byte: 0x038 vertical increment (dir = 1) */
/* last byte: 0x000 horizontal deccrement (dir = 2) */
/* last byte: 0x008 vertical deccrement (dir = 3) */
UCG_C22(0x000, 0x003, 0xc0 | 0x010, 0x008), /* Entry Mode, GRAM write direction and BGR (Bit 12)=1, set TRI (Bit 15) and DFM (Bit 14) --> three byte transfer */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static ucg_int_t ucg_handle_ili9325_l90fx(ucg_t *ucg)
{
uint8_t c[3];
if ( ucg_clip_l90fx(ucg) != 0 )
{
switch(ucg->arg.dir)
{
case 0:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir0_seq);
break;
case 1:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir1_seq);
break;
case 2:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir2_seq);
break;
case 3:
default:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir3_seq);
break;
}
c[0] = ucg->arg.pixel.rgb.color[0];
c[1] = ucg->arg.pixel.rgb.color[1];
c[2] = ucg->arg.pixel.rgb.color[2];
ucg_com_SendRepeat3Bytes(ucg, ucg->arg.len, c);
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
/*
L2TC (Glyph Output)
Because of this for vertical lines the x min and max values in
"ucg_ili9325_set_pos_for_y_seq" are identical to avoid changes of the x position
*/
static const ucg_pgm_uint8_t ucg_ili9325_set_x_pos_seq[] =
{
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_y_pos_seq[] =
{
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
/* without CmdDataSequence */
ucg_int_t xxxxxx_ucg_handle_ili9325_l90tc(ucg_t *ucg)
{
if ( ucg_clip_l90tc(ucg) != 0 )
{
uint8_t buf[3];
ucg_int_t dx, dy;
ucg_int_t i;
const uint8_t *seq;
unsigned char pixmap;
uint8_t bitcnt;
ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_seq);
switch(ucg->arg.dir)
{
case 0:
dx = 1; dy = 0;
seq = ucg_ili9325_set_x_pos_seq;
break;
case 1:
dx = 0; dy = 1;
seq = ucg_ili9325_set_y_pos_seq;
break;
case 2:
dx = -1; dy = 0;
seq = ucg_ili9325_set_x_pos_seq;
break;
case 3:
default:
dx = 0; dy = -1;
seq = ucg_ili9325_set_y_pos_seq;
break;
}
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = ucg->arg.pixel_skip;
pixmap <<= bitcnt;
buf[0] = ucg->arg.pixel.rgb.color[0];
buf[1] = ucg->arg.pixel.rgb.color[1];
buf[2] = ucg->arg.pixel.rgb.color[2];
//ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
for( i = 0; i < ucg->arg.len; i++ )
{
if ( (pixmap & 128) != 0 )
{
ucg_com_SendCmdSeq(ucg, seq);
ucg_com_SendRepeat3Bytes(ucg, 1, buf);
}
pixmap<<=1;
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
bitcnt++;
if ( bitcnt >= 8 )
{
ucg->arg.bitmap++;
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = 0;
}
}
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
/* with CmdDataSequence */
static ucg_int_t ucg_handle_ili9325_l90tc(ucg_t *ucg)
{
if ( ucg_clip_l90tc(ucg) != 0 )
{
uint8_t buf[20];
ucg_int_t dx, dy;
ucg_int_t i;
unsigned char pixmap;
uint8_t bitcnt;
ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_seq);
buf[0] = 0x001; // change to 0 (cmd mode)
buf[1] = 0x020; // set x
buf[2] = 0x002; // change to 1 (arg mode)
buf[3] = 0x000; // upper part x
buf[4] = 0x000; // no change
buf[5] = 0x000; // will be overwritten by x value
switch(ucg->arg.dir)
{
case 0:
dx = 1; dy = 0;
buf[6] = 0x001; // change to 0 (cmd mode)
buf[7] = 0x022; // write data
buf[8] = 0x002; // change to 1 (data mode)
buf[9] = 0x000; // red value
buf[10] = 0x000; // no change
buf[11] = 0x000; // green value
buf[12] = 0x000; // no change
buf[13] = 0x000; // blue value
break;
case 1:
dx = 0; dy = 1;
buf[6] = 0x001; // change to 0 (cmd mode)
buf[7] = 0x021; // set y
buf[8] = 0x002; // change to 1 (arg mode)
buf[9] = 0x000; // upper part y
buf[10] = 0x000; // no change
buf[11] = 0x000; // will be overwritten by y value
buf[12] = 0x001; // change to 0 (cmd mode)
buf[13] = 0x022; // write data
buf[14] = 0x002; // change to 1 (data mode)
buf[15] = 0x000; // red value
buf[16] = 0x000; // no change
buf[17] = 0x000; // green value
buf[18] = 0x000; // no change
buf[19] = 0x000; // blue value
break;
case 2:
dx = -1; dy = 0;
buf[6] = 0x001; // change to 0 (cmd mode)
buf[7] = 0x022; // write data
buf[8] = 0x002; // change to 1 (data mode)
buf[9] = 0x000; // red value
buf[10] = 0x000; // no change
buf[11] = 0x000; // green value
buf[12] = 0x000; // no change
buf[13] = 0x000; // blue value
break;
case 3:
default:
dx = 0; dy = -1;
buf[6] = 0x001; // change to 0 (cmd mode)
buf[7] = 0x021; // set y
buf[8] = 0x002; // change to 1 (arg mode)
buf[9] = 0x000; // upper part y
buf[10] = 0x000; // no change
buf[11] = 0x000; // will be overwritten by y value
buf[12] = 0x001; // change to 0 (cmd mode)
buf[13] = 0x022; // write data
buf[14] = 0x002; // change to 1 (data mode)
buf[15] = 0x000; // red value
buf[16] = 0x000; // no change
buf[17] = 0x000; // green value
buf[18] = 0x000; // no change
buf[19] = 0x000; // blue value
break;
}
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = ucg->arg.pixel_skip;
pixmap <<= bitcnt;
if ( (ucg->arg.dir&1) == 0 )
{
buf[9] = ucg->arg.pixel.rgb.color[0];
buf[11] = ucg->arg.pixel.rgb.color[1];
buf[13] = ucg->arg.pixel.rgb.color[2];
}
else
{
buf[15] = ucg->arg.pixel.rgb.color[0];
buf[17] = ucg->arg.pixel.rgb.color[1];
buf[19] = ucg->arg.pixel.rgb.color[2];
}
//ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
for( i = 0; i < ucg->arg.len; i++ )
{
if ( (pixmap & 128) != 0 )
{
if ( (ucg->arg.dir&1) == 0 )
{
buf[5] = ucg->arg.pixel.pos.x;
ucg_com_SendCmdDataSequence(ucg, 7, buf, 1);
}
else
{
buf[5] = ucg->arg.pixel.pos.x;
buf[9] = (ucg->arg.pixel.pos.y>>8)&1;
buf[11] = ucg->arg.pixel.pos.y&255;
ucg_com_SendCmdDataSequence(ucg, 10, buf, 1);
}
}
pixmap<<=1;
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
bitcnt++;
if ( bitcnt >= 8 )
{
ucg->arg.bitmap++;
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = 0;
}
}
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
static ucg_int_t ucg_handle_ili9325_l90se(ucg_t *ucg)
{
uint8_t i;
uint8_t c[3];
/* Setup ccs for l90se. This will be updated by ucg_clip_l90se if required */
for ( i = 0; i < 3; i++ )
{
ucg_ccs_init(ucg->arg.ccs_line+i, ucg->arg.rgb[0].color[i], ucg->arg.rgb[1].color[i], ucg->arg.len);
}
/* check if the line is visible */
if ( ucg_clip_l90se(ucg) != 0 )
{
ucg_int_t i;
switch(ucg->arg.dir)
{
case 0:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir0_seq);
break;
case 1:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir1_seq);
break;
case 2:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir2_seq);
break;
case 3:
default:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir3_seq);
break;
}
for( i = 0; i < ucg->arg.len; i++ )
{
c[0] = ucg->arg.ccs_line[0].current;
c[1] = ucg->arg.ccs_line[1].current;
c[2] = ucg->arg.ccs_line[2].current;
ucg_com_SendRepeat3Bytes(ucg, 1, c);
ucg_ccs_step(ucg->arg.ccs_line+0);
ucg_ccs_step(ucg->arg.ccs_line+1);
ucg_ccs_step(ucg->arg.ccs_line+2);
}
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
ucg_int_t ucg_dev_ic_ili9325_18(ucg_t *ucg, ucg_int_t msg, void *data)
{
switch(msg)
{
case UCG_MSG_DEV_POWER_UP:
/* setup com interface and provide information on the clock speed */
/* of the serial and parallel interface. Values are nanoseconds. */
return ucg_com_PowerUp(ucg, 40, 100);
case UCG_MSG_DEV_POWER_DOWN:
/* not yet implemented */
return 1;
case UCG_MSG_GET_DIMENSION:
((ucg_wh_t *)data)->w = 240;
((ucg_wh_t *)data)->h = 320;
return 1;
case UCG_MSG_DRAW_PIXEL:
if ( ucg_clip_is_pixel_visible(ucg) !=0 )
{
uint8_t c[3];
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_seq);
c[0] = ucg->arg.pixel.rgb.color[0];
c[1] = ucg->arg.pixel.rgb.color[1];
c[2] = ucg->arg.pixel.rgb.color[2];
ucg_com_SendRepeat3Bytes(ucg, 1, c);
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
}
return 1;
case UCG_MSG_DRAW_L90FX:
//ucg_handle_l90fx(ucg, ucg_dev_ic_ili9325_18);
ucg_handle_ili9325_l90fx(ucg);
return 1;
#ifdef UCG_MSG_DRAW_L90TC
case UCG_MSG_DRAW_L90TC:
//ucg_handle_l90tc(ucg, ucg_dev_ic_ili9325);
ucg_handle_ili9325_l90tc(ucg);
return 1;
#endif /* UCG_MSG_DRAW_L90TC */
#ifdef UCG_MSG_DRAW_L90BF
case UCG_MSG_DRAW_L90BF:
ucg_handle_l90bf(ucg, ucg_dev_ic_ili9325_18);
return 1;
#endif /* UCG_MSG_DRAW_L90BF */
/* msg UCG_MSG_DRAW_L90SE is handled by ucg_dev_default_cb */
/*
case UCG_MSG_DRAW_L90SE:
return ucg->ext_cb(ucg, msg, data);
*/
}
return ucg_dev_default_cb(ucg, msg, data);
}
ucg_int_t ucg_ext_ili9325_18(ucg_t *ucg, ucg_int_t msg, void *data)
{
switch(msg)
{
case UCG_MSG_DRAW_L90SE:
//ucg_handle_l90se(ucg, ucg_dev_ic_ili9325);
ucg_handle_ili9325_l90se(ucg);
break;
}
return 1;
}
\ No newline at end of file
/*
ucg_dev_ic_ili9325_spi.c
Specific code for the ili9325 controller (TFT displays) with SPI mode (IM3=0, IM2=1, IM1=1, IM0=1)
1 May 2014: Currently, this is not working
Universal uC Color Graphics Library
Copyright (c) 2014, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ucg.h"
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_seq[] =
{
UCG_CS(0), /* enable chip */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_dir0_seq[] =
{
UCG_CS(0), /* enable chip */
/* last byte: 0x030 horizontal increment (dir = 0) */
/* last byte: 0x038 vertical increment (dir = 1) */
/* last byte: 0x000 horizontal deccrement (dir = 2) */
/* last byte: 0x008 vertical deccrement (dir = 3) */
UCG_C12(0x003, 0xc0 | 0x010, 0x030), /* Entry Mode, GRAM write direction and BGR (Bit 12)=1, set TRI (Bit 15) and DFM (Bit 14) --> three byte transfer */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_dir1_seq[] =
{
UCG_CS(0), /* enable chip */
/* last byte: 0x030 horizontal increment (dir = 0) */
/* last byte: 0x038 vertical increment (dir = 1) */
/* last byte: 0x000 horizontal deccrement (dir = 2) */
/* last byte: 0x008 vertical deccrement (dir = 3) */
UCG_C12(0x003, 0xc0 | 0x010, 0x038), /* Entry Mode, GRAM write direction and BGR (Bit 12)=1, set TRI (Bit 15) and DFM (Bit 14) --> three byte transfer */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_dir2_seq[] =
{
UCG_CS(0), /* enable chip */
/* last byte: 0x030 horizontal increment (dir = 0) */
/* last byte: 0x038 vertical increment (dir = 1) */
/* last byte: 0x000 horizontal deccrement (dir = 2) */
/* last byte: 0x008 vertical deccrement (dir = 3) */
UCG_C12(0x003, 0xc0 | 0x010, 0x000), /* Entry Mode, GRAM write direction and BGR (Bit 12)=1, set TRI (Bit 15) and DFM (Bit 14) --> three byte transfer */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_pos_dir3_seq[] =
{
UCG_CS(0), /* enable chip */
/* last byte: 0x030 horizontal increment (dir = 0) */
/* last byte: 0x038 vertical increment (dir = 1) */
/* last byte: 0x000 horizontal deccrement (dir = 2) */
/* last byte: 0x008 vertical deccrement (dir = 3) */
UCG_C12(0x003, 0xc0 | 0x010, 0x008), /* Entry Mode, GRAM write direction and BGR (Bit 12)=1, set TRI (Bit 15) and DFM (Bit 14) --> three byte transfer */
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static ucg_int_t ucg_handle_ili9325_l90fx(ucg_t *ucg)
{
uint8_t c[3];
if ( ucg_clip_l90fx(ucg) != 0 )
{
switch(ucg->arg.dir)
{
case 0:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir0_seq);
break;
case 1:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir1_seq);
break;
case 2:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir2_seq);
break;
case 3:
default:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir3_seq);
break;
}
c[0] = ucg->arg.pixel.rgb.color[0];
c[1] = ucg->arg.pixel.rgb.color[1];
c[2] = ucg->arg.pixel.rgb.color[2];
ucg_com_SendRepeat3Bytes(ucg, ucg->arg.len, c);
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
/*
L2TC (Glyph Output)
Because of this for vertical lines the x min and max values in
"ucg_ili9325_set_pos_for_y_seq" are identical to avoid changes of the x position
*/
static const ucg_pgm_uint8_t ucg_ili9325_set_x_pos_seq[] =
{
UCG_C10(0x020), UCG_VARX(0,0x00, 0), UCG_VARX(0,0x0ff, 0), /* set x position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
static const ucg_pgm_uint8_t ucg_ili9325_set_y_pos_seq[] =
{
UCG_C10(0x021), UCG_VARY(8,0x01, 0), UCG_VARY(0,0x0ff, 0), /* set y position */
UCG_C10(0x022), /* write to RAM */
UCG_DATA(), /* change to data mode */
UCG_END()
};
/* without CmdDataSequence */
static ucg_int_t xxxxxx_ucg_handle_ili9325_l90tc(ucg_t *ucg)
{
if ( ucg_clip_l90tc(ucg) != 0 )
{
uint8_t buf[3];
ucg_int_t dx, dy;
ucg_int_t i;
const uint8_t *seq;
unsigned char pixmap;
uint8_t bitcnt;
ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_seq);
switch(ucg->arg.dir)
{
case 0:
dx = 1; dy = 0;
seq = ucg_ili9325_set_x_pos_seq;
break;
case 1:
dx = 0; dy = 1;
seq = ucg_ili9325_set_y_pos_seq;
break;
case 2:
dx = -1; dy = 0;
seq = ucg_ili9325_set_x_pos_seq;
break;
case 3:
default:
dx = 0; dy = -1;
seq = ucg_ili9325_set_y_pos_seq;
break;
}
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = ucg->arg.pixel_skip;
pixmap <<= bitcnt;
buf[0] = ucg->arg.pixel.rgb.color[0];
buf[1] = ucg->arg.pixel.rgb.color[1];
buf[2] = ucg->arg.pixel.rgb.color[2];
//ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
for( i = 0; i < ucg->arg.len; i++ )
{
if ( (pixmap & 128) != 0 )
{
ucg_com_SendCmdSeq(ucg, seq);
ucg_com_SendRepeat3Bytes(ucg, 1, buf);
}
pixmap<<=1;
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
bitcnt++;
if ( bitcnt >= 8 )
{
ucg->arg.bitmap++;
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = 0;
}
}
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
/* with CmdDataSequence */
static ucg_int_t ucg_handle_ili9325_l90tc(ucg_t *ucg)
{
if ( ucg_clip_l90tc(ucg) != 0 )
{
uint8_t buf[20];
ucg_int_t dx, dy;
ucg_int_t i;
unsigned char pixmap;
uint8_t bitcnt;
ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_seq);
buf[0] = 0x001; // change to 0 (cmd mode)
buf[1] = 0x020; // set x
buf[2] = 0x002; // change to 1 (arg mode)
buf[3] = 0x000; // upper part x
buf[4] = 0x000; // no change
buf[5] = 0x000; // will be overwritten by x value
switch(ucg->arg.dir)
{
case 0:
dx = 1; dy = 0;
buf[6] = 0x001; // change to 0 (cmd mode)
buf[7] = 0x022; // write data
buf[8] = 0x002; // change to 1 (data mode)
buf[9] = 0x000; // red value
buf[10] = 0x000; // no change
buf[11] = 0x000; // green value
buf[12] = 0x000; // no change
buf[13] = 0x000; // blue value
break;
case 1:
dx = 0; dy = 1;
buf[6] = 0x001; // change to 0 (cmd mode)
buf[7] = 0x021; // set y
buf[8] = 0x002; // change to 1 (arg mode)
buf[9] = 0x000; // upper part y
buf[10] = 0x000; // no change
buf[11] = 0x000; // will be overwritten by y value
buf[12] = 0x001; // change to 0 (cmd mode)
buf[13] = 0x022; // write data
buf[14] = 0x002; // change to 1 (data mode)
buf[15] = 0x000; // red value
buf[16] = 0x000; // no change
buf[17] = 0x000; // green value
buf[18] = 0x000; // no change
buf[19] = 0x000; // blue value
break;
case 2:
dx = -1; dy = 0;
buf[6] = 0x001; // change to 0 (cmd mode)
buf[7] = 0x022; // write data
buf[8] = 0x002; // change to 1 (data mode)
buf[9] = 0x000; // red value
buf[10] = 0x000; // no change
buf[11] = 0x000; // green value
buf[12] = 0x000; // no change
buf[13] = 0x000; // blue value
break;
case 3:
default:
dx = 0; dy = -1;
buf[6] = 0x001; // change to 0 (cmd mode)
buf[7] = 0x021; // set y
buf[8] = 0x002; // change to 1 (arg mode)
buf[9] = 0x000; // upper part y
buf[10] = 0x000; // no change
buf[11] = 0x000; // will be overwritten by y value
buf[12] = 0x001; // change to 0 (cmd mode)
buf[13] = 0x022; // write data
buf[14] = 0x002; // change to 1 (data mode)
buf[15] = 0x000; // red value
buf[16] = 0x000; // no change
buf[17] = 0x000; // green value
buf[18] = 0x000; // no change
buf[19] = 0x000; // blue value
break;
}
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = ucg->arg.pixel_skip;
pixmap <<= bitcnt;
if ( (ucg->arg.dir&1) == 0 )
{
buf[9] = ucg->arg.pixel.rgb.color[0];
buf[11] = ucg->arg.pixel.rgb.color[1];
buf[13] = ucg->arg.pixel.rgb.color[2];
}
else
{
buf[15] = ucg->arg.pixel.rgb.color[0];
buf[17] = ucg->arg.pixel.rgb.color[1];
buf[19] = ucg->arg.pixel.rgb.color[2];
}
//ucg_com_SetCSLineStatus(ucg, 0); /* enable chip */
for( i = 0; i < ucg->arg.len; i++ )
{
if ( (pixmap & 128) != 0 )
{
if ( (ucg->arg.dir&1) == 0 )
{
buf[5] = ucg->arg.pixel.pos.x;
ucg_com_SendCmdDataSequence(ucg, 7, buf, 1);
}
else
{
buf[5] = ucg->arg.pixel.pos.x;
buf[9] = (ucg->arg.pixel.pos.y>>8)&1;
buf[11] = ucg->arg.pixel.pos.y&255;
ucg_com_SendCmdDataSequence(ucg, 10, buf, 1);
}
}
pixmap<<=1;
ucg->arg.pixel.pos.x+=dx;
ucg->arg.pixel.pos.y+=dy;
bitcnt++;
if ( bitcnt >= 8 )
{
ucg->arg.bitmap++;
pixmap = ucg_pgm_read(ucg->arg.bitmap);
bitcnt = 0;
}
}
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
static ucg_int_t ucg_handle_ili9325_l90se(ucg_t *ucg)
{
uint8_t i;
uint8_t c[3];
/* Setup ccs for l90se. This will be updated by ucg_clip_l90se if required */
for ( i = 0; i < 3; i++ )
{
ucg_ccs_init(ucg->arg.ccs_line+i, ucg->arg.rgb[0].color[i], ucg->arg.rgb[1].color[i], ucg->arg.len);
}
/* check if the line is visible */
if ( ucg_clip_l90se(ucg) != 0 )
{
ucg_int_t i;
switch(ucg->arg.dir)
{
case 0:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir0_seq);
break;
case 1:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir1_seq);
break;
case 2:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir2_seq);
break;
case 3:
default:
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_dir3_seq);
break;
}
for( i = 0; i < ucg->arg.len; i++ )
{
c[0] = ucg->arg.ccs_line[0].current;
c[1] = ucg->arg.ccs_line[1].current;
c[2] = ucg->arg.ccs_line[2].current;
ucg_com_SendRepeat3Bytes(ucg, 1, c);
ucg_ccs_step(ucg->arg.ccs_line+0);
ucg_ccs_step(ucg->arg.ccs_line+1);
ucg_ccs_step(ucg->arg.ccs_line+2);
}
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
return 1;
}
return 0;
}
ucg_int_t ucg_dev_ic_ili9325_spi_18(ucg_t *ucg, ucg_int_t msg, void *data)
{
switch(msg)
{
case UCG_MSG_DEV_POWER_UP:
/* setup com interface and provide information on the clock speed */
/* of the serial and parallel interface. Values are nanoseconds. */
return ucg_com_PowerUp(ucg, 40, 100);
case UCG_MSG_DEV_POWER_DOWN:
/* not yet implemented */
return 1;
case UCG_MSG_GET_DIMENSION:
((ucg_wh_t *)data)->w = 240;
((ucg_wh_t *)data)->h = 320;
return 1;
case UCG_MSG_DRAW_PIXEL:
if ( ucg_clip_is_pixel_visible(ucg) !=0 )
{
uint8_t c[3];
ucg_com_SendCmdSeq(ucg, ucg_ili9325_set_pos_seq);
c[0] = ucg->arg.pixel.rgb.color[0];
c[1] = ucg->arg.pixel.rgb.color[1];
c[2] = ucg->arg.pixel.rgb.color[2];
ucg_com_SendRepeat3Bytes(ucg, 1, c);
ucg_com_SetCSLineStatus(ucg, 1); /* disable chip */
}
return 1;
case UCG_MSG_DRAW_L90FX:
//ucg_handle_l90fx(ucg, ucg_dev_ic_ili9325_18);
ucg_handle_ili9325_l90fx(ucg);
return 1;
#ifdef UCG_MSG_DRAW_L90TC
case UCG_MSG_DRAW_L90TC:
//ucg_handle_l90tc(ucg, ucg_dev_ic_ili9325);
ucg_handle_ili9325_l90tc(ucg);
return 1;
#endif /* UCG_MSG_DRAW_L90TC */
#ifdef UCG_MSG_DRAW_L90BF
case UCG_MSG_DRAW_L90BF:
ucg_handle_l90bf(ucg, ucg_dev_ic_ili9325_18);
return 1;
#endif /* UCG_MSG_DRAW_L90BF */
/* msg UCG_MSG_DRAW_L90SE is handled by ucg_dev_default_cb */
/*
case UCG_MSG_DRAW_L90SE:
return ucg->ext_cb(ucg, msg, data);
*/
}
return ucg_dev_default_cb(ucg, msg, data);
}
ucg_int_t ucg_ext_ili9325_spi_18(ucg_t *ucg, ucg_int_t msg, void *data)
{
switch(msg)
{
case UCG_MSG_DRAW_L90SE:
//ucg_handle_l90se(ucg, ucg_dev_ic_ili9325);
ucg_handle_ili9325_l90se(ucg);
break;
}
return 1;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment