Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
b387ba93
Commit
b387ba93
authored
Mar 12, 2015
by
devsaurus
Browse files
introduce u8g_config.h
parent
7b160da1
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/include/u8g_config.h
0 → 100644
View file @
b387ba93
#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__ */
app/include/user_config.h
View file @
b387ba93
...
...
@@ -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__ */
app/modules/u8g.c
View file @
b387ba93
// 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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment