diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2011-10-13 20:33:30 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2011-10-13 20:33:30 +0200 |
commit | 5d9d373a959271b498710817d08c2ea8e153aa6e (patch) | |
tree | 6867e887454a850b4e15616000ef342a1c661c7e /firmware/spi.h | |
parent | 35a36b0a6c69ce136fd6ea2a203d34e48e1291e8 (diff) | |
download | mini-octopus-5d9d373a959271b498710817d08c2ea8e153aa6e.tar.gz mini-octopus-5d9d373a959271b498710817d08c2ea8e153aa6e.zip |
correct firmware??
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 */ |