extend ucg example with ST7735 display
This commit is contained in:
parent
db1162015d
commit
154b456f11
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue