Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
spi_cs_control Struct Reference

SPI Chip Select control structure. More...

#include <spi.h>

Data Fields

const struct devicegpio_dev
 
uint32_t delay
 
gpio_pin_t gpio_pin
 
gpio_dt_flags_t gpio_dt_flags
 

Detailed Description

SPI Chip Select control structure.

This can be used to control a CS line via a GPIO line, instead of using the controller inner CS logic.

Parameters
gpio_devis a valid pointer to an actual GPIO device. A NULL pointer can be provided to full inhibit CS control if necessary.
gpio_pinis a number representing the gpio PIN that will be used to act as a CS line
delayis a delay in microseconds to wait before starting the transmission and before releasing the CS line
gpio_dt_flagsis the devicetree flags corresponding to how the CS line should be driven. GPIO_ACTIVE_LOW/GPIO_ACTIVE_HIGH should be equivalent to SPI_CS_ACTIVE_HIGH/SPI_CS_ACTIVE_LOW options in struct spi_config.

Field Documentation

◆ delay

uint32_t spi_cs_control::delay

◆ gpio_dev

const struct device* spi_cs_control::gpio_dev

◆ gpio_dt_flags

gpio_dt_flags_t spi_cs_control::gpio_dt_flags

◆ gpio_pin

gpio_pin_t spi_cs_control::gpio_pin

The documentation for this struct was generated from the following file: