introduce u8g_config.h

This commit is contained in:
devsaurus 2015-03-12 21:50:57 +01:00
parent 7b160da1a3
commit b387ba93ec
3 changed files with 16 additions and 19 deletions

14
app/include/u8g_config.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef __U8G_CONFIG_H__
#define __U8G_CONFIG_H__
// Configure U8glib fonts
// add a U8G_FONT_TABLE_ENTRY for each font you want to compile into the image
#define U8G_FONT_TABLE_ENTRY(font)
#define U8G_FONT_TABLE \
U8G_FONT_TABLE_ENTRY(font_6x10) \
U8G_FONT_TABLE_ENTRY(font_chikita)
#undef U8G_FONT_TABLE_ENTRY
#endif /* __U8G_CONFIG_H__ */

View File

@ -65,12 +65,4 @@
#define LED_LOW_COUNT_DEFAULT 0
#endif
// Configure U8glib fonts
// add a U8G_FONT_TABLE_ENTRY for each font you want to compile into the image
#define U8G_FONT_TABLE_ENTRY(font)
#define U8G_FONT_TABLE \
U8G_FONT_TABLE_ENTRY(font_6x10) \
U8G_FONT_TABLE_ENTRY(font_chikita)
#undef U8G_FONT_TABLE_ENTRY
#endif /* __USER_CONFIG_H__ */

View File

@ -1,6 +1,5 @@
// Module for U8glib
//#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#include "platform.h"
@ -12,6 +11,8 @@
#include "u8g.h"
#include "u8g_config.h"
struct _lu8g_userdata_t
{
u8g_t u8g;
@ -25,16 +26,6 @@ typedef struct _lu8g_userdata_t lu8g_userdata_t;
#define LU8G (&(lud->u8g))
// Font look-up array
//static const u8g_fntpgm_uint8_t *font_array[] =
//{
//#undef U8G_FONT_TABLE_ENTRY
//#define U8G_FONT_TABLE_ENTRY(font) u8g_ ## font ,
// U8G_FONT_TABLE
// NULL
//};
// function to read 4-byte aligned from program memory AKA irom0
u8g_pgm_uint8_t ICACHE_FLASH_ATTR u8g_pgm_read(const u8g_pgm_uint8_t *adr)
{