diff options
author | Perry Hung <iperry@alum.mit.edu> | 2010-04-28 19:19:34 -0400 |
---|---|---|
committer | Perry Hung <iperry@alum.mit.edu> | 2010-04-28 19:19:34 -0400 |
commit | a7031b147c9ee77d1ed04ec419a7a23edd08014a (patch) | |
tree | cebd5e51dfba2c0af4d47156e909fb190af77069 /wirish/comm/HardwareSPI.h | |
parent | 28feb18a8f6d3dd2d0d78a40d4213407fb54e5dd (diff) | |
download | librambutan-a7031b147c9ee77d1ed04ec419a7a23edd08014a.tar.gz librambutan-a7031b147c9ee77d1ed04ec419a7a23edd08014a.zip |
Various SPI changes.
-Read DR after each master send, return the response.
-Added a send function to allow you to pass buffers to the SPI peripheral instead of goin a byte at a time.
Diffstat (limited to 'wirish/comm/HardwareSPI.h')
-rw-r--r-- | wirish/comm/HardwareSPI.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wirish/comm/HardwareSPI.h b/wirish/comm/HardwareSPI.h index 04d67ba..e606c0c 100644 --- a/wirish/comm/HardwareSPI.h +++ b/wirish/comm/HardwareSPI.h @@ -49,8 +49,8 @@ class HardwareSPI { HardwareSPI(uint32 spi_num); void begin(void); void begin(SPIFrequency freq, uint32 endianness, uint32 mode); - void send(uint8 data); - void send(uint8 *data, uint32 length); + uint8 send(uint8 data); + uint8 send(uint8 *data, uint32 length); uint8 recv(void); }; |