Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
spi_cs_control Struct Reference

SPI Chip Select control structure. More...

#include <zephyr/drivers/spi.h>

Data Fields

union { 
   struct { 
      struct gpio_dt_spec   gpio 
 GPIO devicetree specification of CS GPIO. More...
      uint32_t   delay 
 Delay in microseconds to wait before starting the transmission and before releasing the CS line. More...
   } 
   struct { 
      uint32_t   setup_ns 
 CS enable lead time, i.e. More...
      uint32_t   hold_ns 
 CS enable lag time, i.e. More...
   } 
}; 
bool cs_is_gpio

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 internal CS logic.

Field Documentation

◆ [union]

union { ... } spi_cs_control

◆ cs_is_gpio

bool spi_cs_control::cs_is_gpio

◆ delay

uint32_t spi_cs_control::delay

Delay in microseconds to wait before starting the transmission and before releasing the CS line.

◆ gpio

struct gpio_dt_spec spi_cs_control::gpio

GPIO devicetree specification of CS GPIO.

The device pointer can be set to NULL to fully inhibit CS control if necessary. The GPIO flags GPIO_ACTIVE_LOW/GPIO_ACTIVE_HIGH should be equivalent to SPI_CS_ACTIVE_HIGH/SPI_CS_ACTIVE_LOW options in struct spi_config.

◆ hold_ns

uint32_t spi_cs_control::hold_ns

CS enable lag time, i.e.

how long should the CS be asserted after the last clock, before the CS de-asserts. Specified in nanoseconds.

◆ setup_ns

uint32_t spi_cs_control::setup_ns

CS enable lead time, i.e.

how long should the CS be asserted before the first clock. Specified in nanoseconds.


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