RTEMS  5.1
Data Fields

SPI bus control. More...

#include <spi.h>

Data Fields

int(* transfer )(spi_bus *bus, const spi_ioc_transfer *msgs, uint32_t msg_count)
 Transfers SPI messages. More...
 
int(* setup )(spi_bus *bus)
 Checks if maximum speed and bits per word are in a valid range for the device. More...
 
void(* destroy )(spi_bus *bus)
 Destroys the bus. More...
 
rtems_recursive_mutex mutex
 Mutex to protect the bus access.
 
uint32_t max_speed_hz
 Maximum Speed in Hz.
 
uint32_t speed_hz
 Indicates the speed of the current device message.
 
bool cs_change
 Indicates if chip select must be set high after transfer.
 
uint8_t cs
 Indicates which device is selected by chip select.
 
uint8_t bits_per_word
 Indicates the bits per word used on the device.
 
bool lsb_first
 Indicates if LSB is supposed to be transmitted first.
 
uint32_t mode
 Current mode.
 
uint16_t delay_usecs
 Indicates the delay between transfers on different chip select devices.
 

Detailed Description

SPI bus control.

Field Documentation

◆ destroy

void(* spi_bus::destroy) (spi_bus *bus)

Destroys the bus.

Parameters
[in]busThe bus control.

◆ setup

int(* spi_bus::setup) (spi_bus *bus)

Checks if maximum speed and bits per word are in a valid range for the device.

Parameters
[in]busThe bus control.
Return values
0Successful operation.
negativeNegative error number in case of an error.

◆ transfer

int(* spi_bus::transfer) (spi_bus *bus, const spi_ioc_transfer *msgs, uint32_t msg_count)

Transfers SPI messages.

Parameters
[in]busThe bus control.
[in]msgsThe messages to transfer.
[in]msg_countThe count of messages to transfer. It must be positive.
Return values
0Successful operation.
negativeNegative error number in case of an error.

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