![]() |
Core2 for AWS IoT EduKit BSP 1.5.1
|
#include "esp_system.h"#include "driver/gpio.h"#include "driver/spi_master.h"#include <string.h>#include <freertos/FreeRTOS.h>#include <freertos/task.h>#include <freertos/semphr.h>#include "lvgl/lvgl.h"#include "disp_spi.h"#include "disp_driver.h"Macros | |
| #define | CONFIG_LV_DISP_SPI_CS 5 |
Functions | |
| void | spi_poll () |
| Polls the SPI bus for a pending SPI transaction to complete. More... | |
| void | disp_spi_add_device_config (spi_host_device_t host, spi_device_interface_config_t *devcfg) |
| void | disp_spi_add_device (spi_host_device_t host) |
| void | disp_spi_transaction (const uint8_t *data, size_t length, disp_spi_send_flag_t flags, disp_spi_read_data *out, uint64_t addr) |
| void | disp_wait_for_pending_transactions (void) |
Variables | |
| SemaphoreHandle_t | spi_mutex |
| Semaphore for the shared SPI bus. More... | |
| #define CONFIG_LV_DISP_SPI_CS 5 |
| void spi_poll | ( | ) |
Polls the SPI bus for a pending SPI transaction to complete.
This function blocks until a pending SPI transaction has finished. Once that transaction is complete, execution of code continues. Useful for using more than one peripheral on the same SPI bus without conflicts.
| void disp_spi_add_device_config | ( | spi_host_device_t | host, |
| spi_device_interface_config_t * | devcfg | ||
| ) |
| void disp_spi_add_device | ( | spi_host_device_t | host | ) |
| void disp_spi_transaction | ( | const uint8_t * | data, |
| size_t | length, | ||
| disp_spi_send_flag_t | flags, | ||
| disp_spi_read_data * | out, | ||
| uint64_t | addr | ||
| ) |
| void disp_wait_for_pending_transactions | ( | void | ) |
| SemaphoreHandle_t spi_mutex |
Semaphore for the shared SPI bus.
This semaphore helps protect the usage of the SPI bus. The implementation of the ILI9342C library uses this mutex to write to the display controller.