#include <stdint.h>
#include <stdbool.h>
#include <driver/spi_master.h>
Go to the source code of this file.
|
| enum | disp_spi_send_flag_t {
DISP_SPI_SEND_QUEUED = 0x00000000
, DISP_SPI_SEND_POLLING = 0x00000001
, DISP_SPI_SEND_SYNCHRONOUS = 0x00000002
, DISP_SPI_SIGNAL_FLUSH = 0x00000004
,
DISP_SPI_RECEIVE = 0x00000008
, DISP_SPI_CMD_8 = 0x00000010
, DISP_SPI_CMD_16 = 0x00000020
, DISP_SPI_ADDRESS_8 = 0x00000040
,
DISP_SPI_ADDRESS_16 = 0x00000080
, DISP_SPI_ADDRESS_24 = 0x00000100
, DISP_SPI_ADDRESS_32 = 0x00000200
, DISP_SPI_MODE_DIO = 0x00000400
,
DISP_SPI_MODE_QIO = 0x00000800
, DISP_SPI_MODE_DIOQIO_ADDR = 0x00001000
} |
| |
◆ member_size
| #define member_size |
( |
|
type, |
|
|
|
member |
|
) |
| sizeof(((type *)0)->member) |
◆ SPI_READ_DUMMY_LEN
◆ SPI_READ_BYTE_LEN
◆ SPI_READ_WORD_LEN
◆ SPI_READ_DWORD_LEN
◆ disp_spi_send_flag_t
| Enumerator |
|---|
| DISP_SPI_SEND_QUEUED | |
| DISP_SPI_SEND_POLLING | |
| DISP_SPI_SEND_SYNCHRONOUS | |
| DISP_SPI_SIGNAL_FLUSH | |
| DISP_SPI_RECEIVE | |
| DISP_SPI_CMD_8 | |
| DISP_SPI_CMD_16 | |
| DISP_SPI_ADDRESS_8 | |
| DISP_SPI_ADDRESS_16 | |
| DISP_SPI_ADDRESS_24 | |
| DISP_SPI_ADDRESS_32 | |
| DISP_SPI_MODE_DIO | |
| DISP_SPI_MODE_QIO | |
| DISP_SPI_MODE_DIOQIO_ADDR | |
◆ __attribute__() [1/2]
| struct _disp_spi_read_data __attribute__ |
( |
(aligned(4)) |
| ) |
|
◆ __attribute__() [2/2]
| union @1 __attribute__::__attribute__ |
( |
(packed) |
| ) |
|
◆ disp_spi_add_device()
| void disp_spi_add_device |
( |
spi_host_device_t |
host | ) |
|
◆ disp_spi_add_device_config()
| void disp_spi_add_device_config |
( |
spi_host_device_t |
host, |
|
|
spi_device_interface_config_t * |
devcfg |
|
) |
| |
◆ 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 |
| ) |
|
◆ 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.
◆ byte
◆ word
◆ dword
◆ _dummy_byte
◆ spi_mutex
| SemaphoreHandle_t spi_mutex |
|
extern |
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.