aboutsummaryrefslogtreecommitdiffstats
path: root/wirish
diff options
context:
space:
mode:
Diffstat (limited to 'wirish')
-rw-r--r--wirish/HardwareSPI.cpp5
-rw-r--r--wirish/include/wirish/HardwareSPI.h5
-rw-r--r--wirish/include/wirish/wirish.h2
-rw-r--r--wirish/usb_serial.cpp6
4 files changed, 13 insertions, 5 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;
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.
*
diff --git a/wirish/include/wirish/wirish.h b/wirish/include/wirish/wirish.h
index 4ebd66f..610aa3f 100644
--- a/wirish/include/wirish/wirish.h
+++ b/wirish/include/wirish/wirish.h
@@ -54,6 +54,8 @@
#include <libmaple/libmaple.h>
+#include <stdint.h>
+
/* Wiring macros and bit defines */
#define true 0x1
diff --git a/wirish/usb_serial.cpp b/wirish/usb_serial.cpp
index af0d710..380f197 100644
--- a/wirish/usb_serial.cpp
+++ b/wirish/usb_serial.cpp
@@ -43,8 +43,10 @@
* Hooks used for bootloader reset signalling
*/
+#if BOARD_HAVE_SERIALUSB
static void rxHook(unsigned, void*);
static void ifaceSetupHook(unsigned, void*);
+#endif
/*
* USBSerial interface
@@ -147,6 +149,8 @@ USBSerial SerialUSB;
* Bootloader hook implementations
*/
+#if BOARD_HAVE_SERIALUSB
+
enum reset_state_t {
DTR_UNSET,
DTR_HIGH,
@@ -241,3 +245,5 @@ static void rxHook(unsigned hook, void *ignored) {
}
}
}
+
+#endif // BOARD_HAVE_SERIALUSB