aboutsummaryrefslogtreecommitdiff
path: root/wirish/HardwareSPI.cpp
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-08-27 16:50:39 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-08-27 16:50:57 -0400
commit853d0b1a5a8fe623502876f00efa030b13328e7b (patch)
tree2a68b1c7bf10c9498f44103497c2e347539b4952 /wirish/HardwareSPI.cpp
parent2022b933bef4b9ff448e6681f51a5c0c4510bd1c (diff)
HardwareSPI: move warning into .cpp from header.
This causes the warning to be emitted at most once. As is, it can be emitted each time HardwareSPI.h is included, which is annoying. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'wirish/HardwareSPI.cpp')
-rw-r--r--wirish/HardwareSPI.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/wirish/HardwareSPI.cpp b/wirish/HardwareSPI.cpp
index 120cd67..94985eb 100644
--- a/wirish/HardwareSPI.cpp
+++ b/wirish/HardwareSPI.cpp
@@ -38,6 +38,11 @@
#include <wirish/wirish.h>
#include <wirish/boards.h>
+#if CYCLES_PER_MICROSECOND != 72
+/* TODO [0.2.0?] something smarter than this */
+#warning "Unexpected clock speed; SPI frequency calculation will be incorrect"
+#endif
+
struct spi_pins {
uint8 nss;
uint8 sck;