SPI ST7789 Example#
Overview#
This sample shows the full flow for driving an ST7789 LCD panel through the RT-Smart HAL.
Source Location#
src/rtsmart/examples/peripheral/spi_st7789
Current Demo Behavior#
The main() function performs these steps:
configure FPIOA and SPI pins
create the LCD instance with SPI plus DC/RST/BL GPIO control
initialize the ST7789 panel
clear the screen and draw three colored strings
show the frame for 5 seconds, then exit
Main APIs (following the current source)#
lcd_create()lcd_configure()lcd_init()lcd_fill()lcd_draw_string()lcd_show()lcd_destroy()
Default Pins and Parameters (hard-coded in the source)#
Use the default pin mapping and SPI-related parameters defined in the sample source unless your board requires changes.
Build Method#
cd src/rtsmart/examples/peripheral/spi_st7789
make
Run Example#
Run the built executable on the target board after copying it to the device.
Notes#
If your board uses a different panel connection or pin mapping, update the source before building.
