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
154b456f
Commit
154b456f
authored
Sep 17, 2015
by
devsaurus
Browse files
extend ucg example with ST7735 display
parent
db116201
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/include/ucg_config.h
View file @
154b456f
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#define UCG_DISPLAY_TABLE_ENTRY(binding, device, extension)
#define UCG_DISPLAY_TABLE_ENTRY(binding, device, extension)
#define UCG_DISPLAY_TABLE \
#define UCG_DISPLAY_TABLE \
UCG_DISPLAY_TABLE_ENTRY(ili9341_18x240x320_hw_spi, ucg_dev_ili9341_18x240x320, ucg_ext_ili9341_18) \
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
#undef UCG_DISPLAY_TABLE_ENTRY
//
//
...
...
lua_examples/ucglib/GraphicsTest.lua
View file @
154b456f
...
@@ -9,7 +9,11 @@ function init_spi_display()
...
@@ -9,7 +9,11 @@ function init_spi_display()
local
res
=
0
-- GPIO16
local
res
=
0
-- GPIO16
spi
.
setup
(
1
,
spi
.
MASTER
,
spi
.
CPOL_LOW
,
spi
.
CPHA_LOW
,
spi
.
DATABITS_8
,
0
)
spi
.
setup
(
1
,
spi
.
MASTER
,
spi
.
CPOL_LOW
,
spi
.
CPHA_LOW
,
spi
.
DATABITS_8
,
0
)
disp
=
ucg
.
ili9341_18x240x320_hw_spi
(
cs
,
dc
,
res
)
-- initialize the matching driver for your display
-- see app/include/ucg_config.h
--disp = ucg.ili9341_18x240x320_hw_spi(cs, dc, res)
disp
=
ucg
.
st7735_18x128x160_hw_spi
(
cs
,
dc
,
res
)
end
end
...
...
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