aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/comm
diff options
context:
space:
mode:
Diffstat (limited to 'wirish/comm')
-rw-r--r--wirish/comm/HardwareSPI.cpp6
-rw-r--r--wirish/comm/HardwareSPI.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/wirish/comm/HardwareSPI.cpp b/wirish/comm/HardwareSPI.cpp
index e083ac1..4379a0d 100644
--- a/wirish/comm/HardwareSPI.cpp
+++ b/wirish/comm/HardwareSPI.cpp
@@ -119,7 +119,11 @@ void HardwareSPI::begin(void) {
* @param data byte to send
*/
void HardwareSPI::send(uint8 data) {
- spi_tx(this->spi_num, data);
+ spi_tx_byte(this->spi_num, data);
+}
+
+void HardwareSPI::send(uint8 *buf, uint32 len) {
+ spi_tx(this->spi_num, buf, len);
}
diff --git a/wirish/comm/HardwareSPI.h b/wirish/comm/HardwareSPI.h
index b974334..04d67ba 100644
--- a/wirish/comm/HardwareSPI.h
+++ b/wirish/comm/HardwareSPI.h
@@ -50,6 +50,7 @@ class HardwareSPI {
void begin(void);
void begin(SPIFrequency freq, uint32 endianness, uint32 mode);
void send(uint8 data);
+ void send(uint8 *data, uint32 length);
uint8 recv(void);
};