aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-08-16 03:09:52 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-08-16 06:13:48 -0400
commita432c87cdcf3ccd7238e042da0be6a2e9cde0f0d (patch)
tree366e860977570add5893eb44459312678e5ca796
parent1468cbdd47feecfc2a456e30f22b54e8cb3b0b09 (diff)
downloadlibrambutan-a432c87cdcf3ccd7238e042da0be6a2e9cde0f0d.tar.gz
librambutan-a432c87cdcf3ccd7238e042da0be6a2e9cde0f0d.zip
HardwareSPI.cpp: minor HardwareSPI::send() cleanup.
-rw-r--r--wirish/comm/HardwareSPI.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/wirish/comm/HardwareSPI.cpp b/wirish/comm/HardwareSPI.cpp
index 2527a01..21ae180 100644
--- a/wirish/comm/HardwareSPI.cpp
+++ b/wirish/comm/HardwareSPI.cpp
@@ -208,11 +208,8 @@ uint8 HardwareSPI::send(uint8 data) {
}
uint8 HardwareSPI::send(uint8 *buf, uint32 len) {
- if (len == 0) {
- return 0;
- }
uint32 txed = 0;
- uint8 ret = 0; // shut up, GCC
+ uint8 ret = 0;
while (txed < len) {
this->write(buf[txed++]);
ret = this->read();