![]() |
RTEMS 6.3
|
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. | |
| int(*) | setup (spi_bus *bus) |
| Checks if maximum speed and bits per word are in a valid range for the device. | |
| void(*) | destroy (spi_bus *bus) |
| Destroys the bus. | |
| 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. | |
| int(*) | ioctl (spi_bus *bus, ioctl_command_t command, void *arg) |
| Driver specific ioctl. | |
SPI bus control.
| void(*) spi_bus::destroy(spi_bus *bus) |
Destroys the bus.
| [in] | bus | The bus control. |
| int(*) spi_bus::ioctl(spi_bus *bus, ioctl_command_t command, void *arg) |
Driver specific ioctl.
| [in] | bus | The bus control. |
| int(*) spi_bus::setup(spi_bus *bus) |
Checks if maximum speed and bits per word are in a valid range for the device.
| [in] | bus | The bus control. |
| 0 | Successful operation. |
| negative | Negative error number in case of an error. |
| int(*) spi_bus::transfer(spi_bus *bus, const spi_ioc_transfer *msgs, uint32_t msg_count) |
Transfers SPI messages.
| [in] | bus | The bus control. |
| [in] | msgs | The messages to transfer. |
| [in] | msg_count | The count of messages to transfer. It must be positive. |
| 0 | Successful operation. |
| negative | Negative error number in case of an error. |