SPI controller configuration structure.
More...
#include <spi.h>
SPI controller configuration structure.
- Parameters
-
frequency | is the bus frequency in Hertz |
operation | is a bit field with the following parts: operational mode [ 0 ] - master or slave.
mode [ 1 : 3 ] - Polarity, phase and loop mode.
transfer [ 4 ] - LSB or MSB first.
word_size [ 5 : 10 ] - Size of a data frame in bits.
lines [ 11 : 12 ] - MISO lines: Single/Dual/Quad/Octal.
cs_hold [ 13 ] - Hold on the CS line if possible.
lock_on [ 14 ] - Keep resource locked for the caller.
cs_active_high [ 15 ] - Active high CS logic.
|
slave | is the slave number from 0 to host controller slave limit. |
cs | is a valid pointer on a struct spi_cs_control is CS line is emulated through a gpio line, or NULL otherwise. |
- Note
- Only cs_hold and lock_on can be changed between consecutive transceive call. Rest of the attributes are not meant to be tweaked.
- Warning
- Most drivers use pointer comparison to determine whether a passed configuration is different from one used in a previous transaction. Changes to fields in the structure may not be detected.
◆ cs
◆ frequency
◆ operation
◆ slave
The documentation for this struct was generated from the following file: