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 +++++ wirish/include/wirish/HardwareSPI.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'wirish') 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; diff --git a/wirish/include/wirish/HardwareSPI.h b/wirish/include/wirish/HardwareSPI.h index a1a4a73..4b61b58 100644 --- a/wirish/include/wirish/HardwareSPI.h +++ b/wirish/include/wirish/HardwareSPI.h @@ -57,11 +57,6 @@ typedef enum SPIFrequency { #define MAX_SPI_FREQS 8 -#if CYCLES_PER_MICROSECOND != 72 -/* TODO [0.2.0?] something smarter than this */ -#warning "Unexpected clock speed; SPI frequency calculation will be incorrect" -#endif - /** * @brief Wirish SPI interface. * -- cgit v1.2.3