7 #ifndef LINUX_LIBV2_SOURCE_SPI_TQ_SPI_H_ 8 #define LINUX_LIBV2_SOURCE_SPI_TQ_SPI_H_ 14 #define SPI_API extern "C" SPI_API int tq_set_spi_max_transfer_speed(int fd, unsigned int speed)
设置SPI通讯时最大波特率
SPI_API int tq_spi_message_send(int fd, unsigned char *sendBuf, int len)
SPI通讯发送函数
SPI_API int tq_spi_message_transfer(int fd, unsigned char *sendBuf, int send_len, unsigned char *recvBuf, int recv_len)
全双工SPI通讯函数,能同时收发
SPI_API int tq_set_spi_bits_per_word(int fd, unsigned short bits)
设置SPI通讯时每个字是多少位
SPI_API int tq_set_spi_mode(int fd, unsigned short mode)
设置SPI模式