Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
fdab6827
Commit
fdab6827
authored
Feb 08, 2015
by
devsaurus
Browse files
implement begin()
parent
289885d6
Changes
2
Show whitespace changes
Inline
Side-by-side
README.md
View file @
fdab6827
...
...
@@ -375,7 +375,7 @@ They'll be available as `u8g.<font_name>` in Lua.
-
[ ] drawBitmap()
-
[ ] drawXBM()
-
[ ] General functions
-
[
] begin()
-
[
x
] begin()
-
[ ] print()
-
[ ] setContrast()
-
[ ] setPrintPos()
...
...
app/modules/u8g.c
View file @
fdab6827
...
...
@@ -58,6 +58,19 @@ static void lu8g_get_int_args( lua_State *L, uint8_t stack, uint8_t num, u8g_uin
}
// Lua: u8g.begin( self )
static
int
lu8g_begin
(
lua_State
*
L
)
{
lu8g_userdata_t
*
lud
;
if
((
lud
=
get_lud
(
L
))
==
NULL
)
return
0
;
u8g_Begin
(
lud
);
return
0
;
}
// Lua: u8g.setFont( self, font )
static
int
lu8g_setFont
(
lua_State
*
L
)
{
...
...
@@ -871,6 +884,7 @@ static int lu8g_ssd1306_128x64_i2c( lua_State *L )
static
const
LUA_REG_TYPE
lu8g_display_map
[]
=
{
{
LSTRKEY
(
"begin"
),
LFUNCVAL
(
lu8g_begin
)
},
{
LSTRKEY
(
"setFont"
),
LFUNCVAL
(
lu8g_setFont
)
},
{
LSTRKEY
(
"setFontRefHeightAll"
),
LFUNCVAL
(
lu8g_setFontRefHeightAll
)
},
{
LSTRKEY
(
"setFontRefHeightExtendedText"
),
LFUNCVAL
(
lu8g_setFontRefHeightExtendedText
)
},
...
...
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