68#define SPI_BUS_OBTAIN _IO(SPI_IOC_MAGIC, 13)
75#define SPI_BUS_RELEASE _IO(SPI_IOC_MAGIC, 23)
spi_bus * spi_bus_alloc_and_init(size_t size)
Allocates a bus control from the heap and initializes it.
Definition: spi-bus.c:323
int spi_bus_init(spi_bus *bus)
Initializes a bus control.
Definition: spi-bus.c:316
int spi_bus_register(spi_bus *bus, const char *bus_path)
Registers a bus control.
Definition: spi-bus.c:248
void spi_bus_destroy_and_free(spi_bus *bus)
Destroys a bus control and frees its memory.
Definition: spi-bus.c:310
void spi_bus_destroy(spi_bus *bus)
Destroys a bus control.
Definition: spi-bus.c:305
This header file defines the RTEMS Classic API.
This header file defines macros to set errno and return minus one.
RTEMS Port of Linux SPI API.
SPI bus control.
Definition: spi.h:80
void(* destroy)(spi_bus *bus)
Destroys the bus.
Definition: spi.h:110
uint8_t cs
Indicates which device is selected by chip select.
Definition: spi.h:135
uint32_t mode
Current mode.
Definition: spi.h:150
uint16_t delay_usecs
Indicates the delay between transfers on different chip select devices.
Definition: spi.h:156
int(* transfer)(spi_bus *bus, const spi_ioc_transfer *msgs, uint32_t msg_count)
Transfers SPI messages.
Definition: spi.h:92
bool lsb_first
Indicates if LSB is supposed to be transmitted first.
Definition: spi.h:145
int(* ioctl)(spi_bus *bus, ioctl_command_t command, void *arg)
Driver specific ioctl.
Definition: spi.h:163
int(* setup)(spi_bus *bus)
Checks if maximum speed and bits per word are in a valid range for the device.
Definition: spi.h:103
bool cs_change
Indicates if chip select must be set high after transfer.
Definition: spi.h:130
uint32_t speed_hz
Indicates the speed of the current device message.
Definition: spi.h:125
rtems_recursive_mutex mutex
Mutex to protect the bus access.
Definition: spi.h:115
uint32_t max_speed_hz
Maximum Speed in Hz.
Definition: spi.h:120
uint8_t bits_per_word
Indicates the bits per word used on the device.
Definition: spi.h:140
SPI transfer message.
Definition: spidev.h:158
This header file provides the API of Self-Contained Objects.