|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
ESP32 SPI type definitions for hardware abstraction. More...
#include "BaseSpi.h"#include "EspTypes_Base.h"#include "HardwareTypes.h"#include "McuSelect.h"#include "driver/spi_master.h"Go to the source code of this file.
Classes | |
| struct | hf_spi_bus_config_t |
| Platform-agnostic SPI bus configuration for STM32. More... | |
| struct | hf_spi_device_config_t |
| SPI device configuration for STM32. More... | |
Macros | |
| #define | HF_SPI_IS_VALID_HOST(host) ((host) < static_cast<uint8_t>(spi_host_device_t::HF_SPI_HOST_MAX)) |
| #define | HF_SPI_IS_VALID_CLOCK_SPEED(speed) ((speed) >= HF_SPI_MIN_CLOCK_SPEED && (speed) <= HF_SPI_MAX_CLOCK_SPEED) |
| #define | HF_SPI_IS_VALID_MODE(mode) ((mode) >= 0 && (mode) <= 3) |
| #define | HF_SPI_IS_VALID_TRANSFER_SIZE(size) ((size) > 0 && (size) <= HF_SPI_MAX_TRANSFER_SIZE) |
| #define | HF_SPI_DEVICE_HALFDUPLEX (1 << 0) |
| #define | HF_SPI_DEVICE_POSITIVE_CS (1 << 1) |
| #define | HF_SPI_DEVICE_CLK_AS_CS (1 << 2) |
| #define | HF_SPI_DEVICE_NO_DUMMY (1 << 3) |
| #define | HF_SPI_DEVICE_DDRCLK (1 << 4) |
Typedefs | |
| using | hf_spi_device_handle_t = spi_device_handle_t |
| using | hf_spi_device_interface_config_t = spi_device_interface_config_t |
| using | hf_spi_transaction_t = spi_transaction_t |
| using | hf_spi_clock_source_t = spi_clock_source_t |
| using | hf_spi_sampling_point_t = spi_sampling_point_t |
Enumerations | |
| enum class | hf_spi_mode_t : uint8_t { HF_SPI_MODE_0 = 0 , HF_SPI_MODE_1 = 1 , HF_SPI_MODE_2 = 2 , HF_SPI_MODE_3 = 3 } |
| ESP32 SPI mode configuration. More... | |
| enum class | hf_spi_transfer_mode_t : uint8_t { HF_SPI_TRANSFER_MODE_SINGLE = 0 , HF_SPI_TRANSFER_MODE_DUAL = 1 , HF_SPI_TRANSFER_MODE_QUAD = 2 , HF_SPI_TRANSFER_MODE_OCTAL = 3 } |
| SPI transfer modes for ESP32. More... | |
| enum class | hf_spi_event_type_t : int { HF_SPI_EVENT_TRANSACTION_COMPLETE = 0 , HF_SPI_EVENT_TRANSACTION_ERROR = 1 , HF_SPI_EVENT_BUS_SUSPENDED = 2 , HF_SPI_EVENT_BUS_RESUMED = 3 , HF_SPI_EVENT_DMA_ERROR = 4 } |
| SPI event types for callback notifications. More... | |
Variables | |
| static constexpr uint32_t | HF_SPI_MIN_CLOCK_SPEED = 1000 |
| Minimum SPI clock speed (Hz) | |
| static constexpr uint32_t | HF_SPI_MAX_CLOCK_SPEED = 80000000 |
| Maximum SPI clock speed (Hz) | |
| static constexpr uint32_t | HF_SPI_MAX_TRANSFER_SIZE = 4092 |
| Maximum transfer size (bytes) | |
| static constexpr uint8_t | HF_SPI_MAX_HOSTS = 3 |
| Maximum SPI hosts. | |
ESP32 SPI type definitions for hardware abstraction.
This header defines only the essential SPI-specific types used by the EspSpi implementation. Clean and minimal approach.
| #define HF_SPI_DEVICE_CLK_AS_CS (1 << 2) |
| #define HF_SPI_DEVICE_DDRCLK (1 << 4) |
| #define HF_SPI_DEVICE_HALFDUPLEX (1 << 0) |
| #define HF_SPI_DEVICE_NO_DUMMY (1 << 3) |
| #define HF_SPI_DEVICE_POSITIVE_CS (1 << 1) |
| #define HF_SPI_IS_VALID_CLOCK_SPEED | ( | speed | ) | ((speed) >= HF_SPI_MIN_CLOCK_SPEED && (speed) <= HF_SPI_MAX_CLOCK_SPEED) |
| #define HF_SPI_IS_VALID_HOST | ( | host | ) | ((host) < static_cast<uint8_t>(spi_host_device_t::HF_SPI_HOST_MAX)) |
| #define HF_SPI_IS_VALID_MODE | ( | mode | ) | ((mode) >= 0 && (mode) <= 3) |
| #define HF_SPI_IS_VALID_TRANSFER_SIZE | ( | size | ) | ((size) > 0 && (size) <= HF_SPI_MAX_TRANSFER_SIZE) |
| using hf_spi_clock_source_t = spi_clock_source_t |
| using hf_spi_device_handle_t = spi_device_handle_t |
| using hf_spi_device_interface_config_t = spi_device_interface_config_t |
| using hf_spi_sampling_point_t = spi_sampling_point_t |
| using hf_spi_transaction_t = spi_transaction_t |
|
strong |
SPI event types for callback notifications.
Event types reported via SPI event callbacks.
|
strong |
|
strong |
SPI transfer modes for ESP32.
Advanced transfer modes including octal SPI support.
|
staticconstexpr |
Maximum SPI clock speed (Hz)
|
staticconstexpr |
Maximum SPI hosts.
|
staticconstexpr |
Maximum transfer size (bytes)
|
staticconstexpr |
Minimum SPI clock speed (Hz)