summaryrefslogtreecommitdiff
path: root/firmware/spi.h
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2011-10-11 21:56:36 +0200
committerYves Fischer <yvesf-git@xapek.org>2011-10-11 21:56:36 +0200
commitcbc941282074856fc6179761b70a0c9879b0b64d (patch)
treeed15c6d9e20ceaf1ff01a05aa63054410bb8ed54 /firmware/spi.h
parent324c5ba9098c1010d0aa8c1e26b95509878ce9f2 (diff)
downloadmini-octopus-cbc941282074856fc6179761b70a0c9879b0b64d.tar.gz
mini-octopus-cbc941282074856fc6179761b70a0c9879b0b64d.zip
update firmware to @319
Diffstat (limited to 'firmware/spi.h')
-rw-r--r--firmware/spi.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/firmware/spi.h b/firmware/spi.h
index d7cfbf1..8a8a1fe 100644
--- a/firmware/spi.h
+++ b/firmware/spi.h
@@ -41,24 +41,25 @@
#define MISO PB3
#define SCK PB1
-void spi_parser(char *buf);
-
-int spi_init(void);
-int spi_deinit(void);
+enum { SPI_SPEED_125kHz, SPI_SPEED_250kHz, SPI_SPEED_500kHz, SPI_SPEED_1MHz,
+ SPI_SPEED_2MHz, SPI_SPEED_4MHz, SPI_SPEED_8MHz };
-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_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_init_usb(void);
void spi_deinit_usb(void);
+int spi_deinit(void);
+
+void spi_send_usb(uint8_t length, char * buf);
+int spi_send(int length, char * buf);
-void spi_set_speed_usb(int speed);
-void spi_send_usb(char * buf, int length);
void spi_receive_usb(int length);
+unsigned char spi_receive(int length, char * buf);
+
void spi_send_and_receive_usb(char * txbuf, int length);
+int spi_send_and_receive(char * txbuf, char * rxbuf, int length);
#endif /* SPI_H */