Brian Silverman | 26e4e52 | 2015-12-17 01:56:40 -0500 | [diff] [blame^] | 1 | #ifndef __SPI_LIB_H__
|
| 2 | #define __SPI_LIB_H__
|
| 3 |
|
| 4 | #ifdef __cplusplus
|
| 5 | extern "C" {
|
| 6 | #endif
|
| 7 | int spilib_open(const char *device);
|
| 8 | void spilib_close(int handle);
|
| 9 | int spilib_setspeed(int handle, uint32_t speed);
|
| 10 | int spilib_setbitsperword(int handle, uint8_t bpw);
|
| 11 | int spilib_setopts(int handle, int msb_first, int sample_on_trailing, int clk_idle_high);
|
| 12 | int spilib_read(int handle, char *recv_buf, int32_t size);
|
| 13 | int spilib_write(int handle, const char *send_buf, int32_t size);
|
| 14 | int spilib_writeread(int handle, const char *send_buf, char *recv_buf, int32_t size);
|
| 15 | #ifdef __cplusplus
|
| 16 | }
|
| 17 | #endif
|
| 18 |
|
| 19 | #endif /* __SPI_LIB_H__ */ |