Go to the documentation of this file.
62 #ifndef SPIDEV_LINUX_H
63 #define SPIDEV_LINUX_H
65 #if defined(__linux__) || defined(DOXYGEN)
128 #ifdef MODULE_PERIPH_SPIDEV_LINUX
129 #error "MODULE periph_spidev_linux is only available on Linux"
char * device_filename[SPI_MAXCS]
Filename for a specific SPI device + CS line (like /dev/spidev0.0)
Static runtime configuration for SPI port + CS line.
int fd[SPI_MAXCS]
File descriptors for each CS line on the bus.
@ SPI_SETUP_OK
parameters are sound
Native CPU peripheral configuration.
mutex_t lock
Mutex for the whole bus (all CS lines)
@ SPI_SETUP_INVALID
invalid params or duplicate definition
Low-level SPI peripheral driver interface definition.
struct spidev_linux_state spidev_linux_state_t
Dynamic runtime state for SPI port + CS line.
struct spidev_linux_conf spidev_linux_conf_t
Static runtime configuration for SPI port + CS line.
#define SPI_MAXCS
Maximum amount of chip select lines per bus.
Dynamic runtime state for SPI port + CS line.
Mutex for thread synchronization.
void spidev_linux_teardown(void)
Close open SPI file descriptors.
int spidev_linux_setup(spi_t bus, unsigned cs_id, const char *name)
register /dev/spidev* device to be used for SPI
unsigned int spi_t
Default type for SPI devices.