From ee22c3dc6d945262303d43e733eaac91bfcf0d9d Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 27 Aug 2012 16:50:39 -0400 Subject: 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 --- wirish/HardwareSPI.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wirish/HardwareSPI.cpp') 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 #include +#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; -- cgit v1.2.3