Commit 154b456f authored by devsaurus's avatar devsaurus
Browse files

extend ucg example with ST7735 display

parent db116201
......@@ -39,6 +39,7 @@
#define UCG_DISPLAY_TABLE_ENTRY(binding, device, extension)
#define UCG_DISPLAY_TABLE \
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
//
......
......@@ -9,7 +9,11 @@ function init_spi_display()
local res = 0 -- GPIO16
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment