This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
feathers2_apa102 [2024/03/26 10:10] sausage |
feathers2_apa102 [2024/04/03 02:21] sausage [The initialisation code] |
||
---|---|---|---|
Line 24: | Line 24: | ||
- | ===== Setting up an ESP32 or ESP32-S2 project ===== | + | ===== Setting up an ESP32-S2 project ===== |
In order that we can get the RGB LED working together, let's make a new project. | In order that we can get the RGB LED working together, let's make a new project. | ||
Line 132: | Line 132: | ||
</code> | </code> | ||
- | To explain the initApa102 function, we have a minimal SPI config and a minimal SPI bus config. The SPI bus is initialised with the SPI config along with which SPI host it is for. The SPI bus config and the SPI host is passed a new device. ****** | + | To explain the initApa102 function, we have a minimal SPI Interface Config and a minimal SPI Bus Config. These configs are set to a SPI host device it is for. |
- | Note the host is FSPI_HOST. This is the host that is controlling the LED. On ESP32 boards (non S2), this SPI is named HSPI_HOST. | + | Our host is ''FSPI_HOST''. This is one that is controlling the LED. On ESP32 boards (non S2), this SPI is named ''HSPI_HOST''. |
See: https://github.com/espressif/esp-idf/blob/357a2776032299b8bc4044900a8f1d6950d7ce89/components/hal/include/hal/spi_types.h#L47-L57 | See: https://github.com/espressif/esp-idf/blob/357a2776032299b8bc4044900a8f1d6950d7ce89/components/hal/include/hal/spi_types.h#L47-L57 |