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
a8ff8f05
Commit
a8ff8f05
authored
May 26, 2017
by
devsaurus
Browse files
Add u8g2 module.
parent
329bd73b
Changes
24
Hide whitespace changes
Inline
Side-by-side
lua_examples/u8glib/u8glib_logo.xbm
deleted
100644 → 0
View file @
329bd73b
File deleted
mkdocs.yml
View file @
a8ff8f05
...
@@ -32,22 +32,24 @@ pages:
...
@@ -32,22 +32,24 @@ pages:
-
Extension Developer FAQ
:
'
en/extn-developer-faq.md'
-
Extension Developer FAQ
:
'
en/extn-developer-faq.md'
-
Support
:
'
en/support.md'
-
Support
:
'
en/support.md'
-
Modules
:
-
Modules
:
-
'
adc'
:
'
en/modules/adc.md'
-
'
adc'
:
'
en/modules/adc.md'
-
'
bit'
:
'
en/modules/bit.md'
-
'
bit'
:
'
en/modules/bit.md'
-
'
bthci'
:
'
en/modules/bthci.md'
-
'
bthci'
:
'
en/modules/bthci.md'
-
'
can'
:
'
en/modules/can.md'
-
'
can'
:
'
en/modules/can.md'
-
'
dht'
:
'
en/modules/dht.md'
-
'
dht'
:
'
en/modules/dht.md'
-
'
file'
:
'
en/modules/file.md'
-
'
file'
:
'
en/modules/file.md'
-
'
gpio'
:
'
en/modules/gpio.md'
-
'
gpio'
:
'
en/modules/gpio.md'
-
'
i2c'
:
'
en/modules/i2c.md'
-
'
i2c'
:
'
en/modules/i2c.md'
-
'
node'
:
'
en/modules/node.md'
-
'
node'
:
'
en/modules/node.md'
-
'
ow
(1-Wire)'
:
'
en/modules/ow.md'
-
'
ow
(1-Wire)'
:
'
en/modules/ow.md'
-
'
sdmmc'
:
'
en/modules/sdmmc.md'
-
'
sdmmc'
:
'
en/modules/sdmmc.md'
-
'
sigma
delta'
:
'
en/modules/sigma-delta.md'
-
'
sigma
delta'
:
'
en/modules/sigma-delta.md'
-
'
spi'
:
'
en/modules/spi.md'
-
'
spi'
:
'
en/modules/spi.md'
-
'
struct'
:
'
en/modules/struct.md'
-
'
struct'
:
'
en/modules/struct.md'
-
'
tmr'
:
'
en/modules/tmr.md'
-
'
tmr'
:
'
en/modules/tmr.md'
-
'
uart'
:
'
en/modules/uart.md'
-
'
u8g2'
:
'
en/modules/u8g2.md'
-
'
wifi'
:
'
en/modules/wifi.md'
-
'
u8g2
Display'
:
'
en/modules/u8g2_disp.md'
-
'
ws2812'
:
'
en/modules/ws2812.md'
-
'
uart'
:
'
en/modules/uart.md'
-
'
wifi'
:
'
en/modules/wifi.md'
-
'
ws2812'
:
'
en/modules/ws2812.md'
tools/u8g2_config_displays.pl
0 → 100755
View file @
a8ff8f05
#!/usr/bin/perl -w
my
(
@i2c_displays
,
@spi_displays
);
# scan provided header file for CONFIG_U8G2_I2C and CONFIG_U8G2_SPI entries
while
(
<
STDIN
>
)
{
if
(
/^\s*#\s*define\s+CONFIG_U8G2_I2C_([^_]+)_(\S+)\s+1/
)
{
push
(
@i2c_displays
,
lc
(
$
1
)
.
"
_i2c_
"
.
lc
(
$
2
));
}
if
(
/^\s*#\s*define\s+CONFIG_U8G2_SPI_(\S+)\s+1/
)
{
push
(
@spi_displays
,
lc
(
$
1
));
}
}
if
(
@i2c_displays
>
0
||
@spi_displays
>
0
)
{
print
<<
'
HEADER
';
#ifndef _U8G2_DISPLAYS_H
#define _U8G2_DISPLAYS_H
#define U8G2_DISPLAY_TABLE_ENTRY(function, binding)
HEADER
print
("
#define U8G2_DISPLAY_TABLE_I2C
\\\n
");
foreach
my
$display
(
@i2c_displays
)
{
print
("
U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_
${display}
_f,
$display
)
\\\n
");
}
print
("
\n
");
print
("
#define U8G2_DISPLAY_TABLE_SPI
\\\n
");
foreach
my
$display
(
@spi_displays
)
{
print
("
U8G2_DISPLAY_TABLE_ENTRY(u8g2_Setup_
${display}
_f,
$display
)
\\\n
");
}
print
("
\n
");
print
<<
'
FOOTER
';
#endif /* _U8G2_DISPLAYS_H */
FOOTER
}
tools/u8g2_config_fonts.pl
0 → 100755
View file @
a8ff8f05
#!/usr/bin/perl -w
my
@font_selection
;
# scan provided header file for CONFIG_U8G2_FONT_SELECTION entry
while
(
<
STDIN
>
)
{
if
(
/^\s*#\s*define\s+CONFIG_U8G2_FONT_SELECTION\s+"([^"]+)"/
)
{
@font_selection
=
split
(
/,/
,
$
1
);
last
;
}
}
if
(
@font_selection
>
0
)
{
print
<<
'
HEADER
';
#ifndef _U8G2_FONTS_H
#define _U8G2_FONTS_H
#define U8G2_FONT_TABLE_ENTRY(font)
#define U8G2_FONT_TABLE \
HEADER
foreach
my
$font
(
@font_selection
)
{
print
("
U8G2_FONT_TABLE_ENTRY(
$font
)
\\\n
");
}
print
<<
'
FOOTER
';
#endif /* _U8G2_FONTS_H */
FOOTER
}
Prev
1
2
Next
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