# SPI ST7789 Example

## Overview

This sample shows the full flow for driving an ST7789 LCD panel through the RT-Smart HAL.

## Source Location

```bash
src/rtsmart/examples/peripheral/spi_st7789
```

## Current Demo Behavior

The `main()` function performs these steps:

1. configure FPIOA and SPI pins
1. create the LCD instance with SPI plus DC/RST/BL GPIO control
1. initialize the ST7789 panel
1. clear the screen and draw three colored strings
1. 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

```bash
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.
