spi.h
457 Bytes
#ifndef SPI_H
#define SPI_H
int configureSpi(char *device);
uint16_t transfer(int fd, uint16_t valeur, int truc);
uint8_t spi_put(int fd, uint8_t valeur);
uint8_t spi_put_multiple(int fd, uint8_t *tx, uint16_t tx_size,
uint8_t *rx, uint16_t rx_size);
void setMode(int fd, uint8_t mode);
uint8_t tr2(int fd, uint8_t val);
uint8_t tr3(int fd, uint8_t *val, uint8_t *rx, uint8_t size);
int configureSpiFromFd (int fd);
#endif /*SPI_H */