diff options
Diffstat (limited to 'firmware/spi.h')
-rw-r--r-- | firmware/spi.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/firmware/spi.h b/firmware/spi.h index 8a8a1fe..d7cfbf1 100644 --- a/firmware/spi.h +++ b/firmware/spi.h @@ -41,25 +41,24 @@ #define MISO PB3 #define SCK PB1 -enum { SPI_SPEED_125kHz, SPI_SPEED_250kHz, SPI_SPEED_500kHz, SPI_SPEED_1MHz, - SPI_SPEED_2MHz, SPI_SPEED_4MHz, SPI_SPEED_8MHz }; - void spi_parser(char *buf); -void spi_init_usb(uint8_t dord, uint8_t mode, uint8_t speed); -int spi_init(uint8_t dord, uint8_t mode, uint8_t speed); - -void spi_deinit_usb(void); +int spi_init(void); int spi_deinit(void); -void spi_send_usb(uint8_t length, char * buf); -int spi_send(int length, char * buf); +int spi_set_speed(int speed); +int spi_send(char * buf, int length); +unsigned char spi_receive( char * buf, int length); +int spi_send_and_receive(char * txbuf, char * rxbuf, int length); -void spi_receive_usb(int length); -unsigned char spi_receive(int length, char * buf); +void spi_init_usb(void); +void spi_deinit_usb(void); + +void spi_set_speed_usb(int speed); +void spi_send_usb(char * buf, int length); +void spi_receive_usb(int length); void spi_send_and_receive_usb(char * txbuf, int length); -int spi_send_and_receive(char * txbuf, char * rxbuf, int length); #endif /* SPI_H */ |