|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
SPI device configuration for STM32. More...
#include <EspTypes_SPI.h>
Public Member Functions | |
| hf_spi_device_config_t () noexcept | |
| hf_spi_device_config_t () noexcept | |
Public Attributes | |
| hf_u32_t | clock_speed_hz |
| Device clock speed (Hz) | |
| hf_spi_mode_t | mode |
| SPI mode (0-3) | |
| hf_pin_num_t | cs_pin |
| CS pin (or -1 for software CS) | |
| hf_u8_t | queue_size |
| Transaction queue size. | |
| hf_u8_t | command_bits |
| Command phase bits (0-16) | |
| hf_u8_t | address_bits |
| Address phase bits (0-64) | |
| hf_u8_t | dummy_bits |
| Dummy bits between address and data. | |
| hf_u16_t | duty_cycle_pos |
| Duty cycle of positive clock (1/256th, 128=50%) | |
| hf_u16_t | cs_ena_pretrans |
| CS active before transmission (bit-cycles) | |
| hf_u8_t | cs_ena_posttrans |
| CS active after transmission (bit-cycles) | |
| hf_u32_t | flags |
| Bitwise OR of SPI_DEVICE_* flags. | |
| hf_u32_t | input_delay_ns |
| Input delay (ns) | |
| void(* | pre_cb )(void *) |
| Pre-transfer callback (optional) | |
| void(* | post_cb )(void *) |
| Post-transfer callback (optional) | |
| void * | user_ctx |
| User context for callbacks. | |
| hf_spi_clock_source_t | clock_source |
| Clock source selection (0=default, ESP32C6 specific) | |
| hf_spi_sampling_point_t | sampling_point |
| Sampling point for data (ESP32C6 specific) | |
| hf_stm32_spi_mode_t | mode |
| SPI mode (informational — set in CubeMX) | |
| GPIO_TypeDef * | cs_port |
| CS GPIO port (e.g., GPIOA) | |
| hf_u16_t | cs_pin |
| CS GPIO pin mask (e.g., GPIO_PIN_4) | |
| bool | cs_active_low |
| CS active low (default: true) | |
SPI device configuration for STM32.
Platform-agnostic SPI device configuration structure for ESP32.
This structure provides all configuration options for registering a device on an SPI bus, including clock, mode, CS, queue, DMA, callbacks, and advanced ESP-IDF v5.5+ features. All fields use project types for portability.
|
inlinenoexcept |
|
inlinenoexcept |
| hf_spi_device_config_t::address_bits |
Address phase bits (0-64)
Address phase bits (0-64)
| hf_spi_device_config_t::clock_source |
Clock source selection (0=default, ESP32C6 specific)
Clock source selection for ESP32C6 (0=default, see spi_clock_source_t)
| hf_u32_t hf_spi_device_config_t::clock_speed_hz |
Device clock speed (Hz)
Clock speed (informational — set in CubeMX)
Device clock speed in Hz
| hf_spi_device_config_t::command_bits |
Command phase bits (0-16)
Command phase bits (0-16)
| bool hf_spi_device_config_t::cs_active_low |
CS active low (default: true)
| hf_spi_device_config_t::cs_ena_posttrans |
CS active after transmission (bit-cycles)
CS active after transmission (bit-cycles)
| hf_spi_device_config_t::cs_ena_pretrans |
CS active before transmission (bit-cycles)
CS active before transmission (bit-cycles)
| hf_spi_device_config_t::cs_pin |
CS pin (or -1 for software CS)
CS pin number (or -1 for software CS)
| hf_u16_t hf_spi_device_config_t::cs_pin |
CS GPIO pin mask (e.g., GPIO_PIN_4)
| GPIO_TypeDef* hf_spi_device_config_t::cs_port |
CS GPIO port (e.g., GPIOA)
| hf_spi_device_config_t::dummy_bits |
Dummy bits between address and data.
Dummy bits between address and data
| hf_spi_device_config_t::duty_cycle_pos |
Duty cycle of positive clock (1/256th, 128=50%)
Duty cycle of positive clock (1/256th, 128=50%)
| hf_spi_device_config_t::flags |
Bitwise OR of SPI_DEVICE_* flags.
Bitwise OR of SPI_DEVICE_* flags
| hf_spi_device_config_t::input_delay_ns |
Input delay (ns)
Input delay in nanoseconds
| hf_spi_device_config_t::mode |
SPI mode (0-3)
SPI mode (0-3)
| hf_stm32_spi_mode_t hf_spi_device_config_t::mode |
SPI mode (informational — set in CubeMX)
| hf_spi_device_config_t::post_cb |
Post-transfer callback (optional)
Post-transfer callback (optional)
| hf_spi_device_config_t::pre_cb |
Pre-transfer callback (optional)
Pre-transfer callback (optional)
| hf_spi_device_config_t::queue_size |
Transaction queue size.
Transaction queue size
| hf_spi_sampling_point_t hf_spi_device_config_t::sampling_point |
Sampling point for data (ESP32C6 specific)
| hf_spi_device_config_t::user_ctx |
User context for callbacks.
User context for callbacks