Core2 for AWS IoT EduKit BSP 1.5.1
Macros | Functions | Variables
disp_spi.c File Reference
#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...
 

Macro Definition Documentation

◆ CONFIG_LV_DISP_SPI_CS

#define CONFIG_LV_DISP_SPI_CS   5

Function Documentation

◆ spi_poll()

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.

Note
This function is necessary when accessing the SD card on the shared SPI bus. Uses spi_device_polling_transmit. to repeatedly poll the SPI bus until the transaction completes.

◆ disp_spi_add_device_config()

void disp_spi_add_device_config ( spi_host_device_t  host,
spi_device_interface_config_t *  devcfg 
)

◆ disp_spi_add_device()

void disp_spi_add_device ( spi_host_device_t  host)

◆ disp_spi_transaction()

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 
)

◆ disp_wait_for_pending_transactions()

void disp_wait_for_pending_transactions ( void  )

Variable Documentation

◆ spi_mutex

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.