SPI bus control.  
 More...
#include <spi.h>
 | 
| 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. 
  | 
|   | 
◆ destroy
      
        
          | void(* spi_bus::destroy) (spi_bus *bus) | 
        
      
 
Destroys the bus. 
- Parameters
 - 
  
  
 
 
 
◆ 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
 - 
  
  
 
- Return values
 - 
  
    | 0 | Successful operation.  | 
    | negative | Negative error number in case of an error.  | 
  
   
 
 
◆ transfer
Transfers SPI messages. 
- Parameters
 - 
  
    | [in] | bus | The bus control.  | 
    | [in] | msgs | The messages to transfer.  | 
    | [in] | msg_count | The count of messages to transfer. It must be positive. | 
  
   
- Return values
 - 
  
    | 0 | Successful operation.  | 
    | negative | Negative error number in case of an error.  | 
  
   
 
 
The documentation for this struct was generated from the following file:
- cpukit/include/dev/spi/spi.h