aboutsummaryrefslogtreecommitdiff
path: root/wirish/include
diff options
context:
space:
mode:
authormlundinse <lundin@mlu.mine.nu>2013-05-03 22:15:35 +0200
committermlundinse <lundin@mlu.mine.nu>2013-05-03 22:15:35 +0200
commitf16f6a54383c6cabc98b1b6cb8ee8e8d1db76926 (patch)
tree80feed9d1aa545225296772a19506a8703b2e28c /wirish/include
parent206c09adc6bbebc9984e9c4e3ea998df8bc13af3 (diff)
wirish/boards.h
Define BOARD_HAVE_USB if usb config bits present and define BOARD_HAVE_SERIALUSB if board have usb and USB_TYPE is USB_SERIAL or undefined Signed-off-by: Magnus Lundin <lundin@mlu.mine.nu>
Diffstat (limited to 'wirish/include')
-rw-r--r--wirish/include/wirish/boards.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/wirish/include/wirish/boards.h b/wirish/include/wirish/boards.h
index 6676a02..ae98325 100644
--- a/wirish/include/wirish/boards.h
+++ b/wirish/include/wirish/boards.h
@@ -167,7 +167,9 @@ bool boardUsesPin(uint8 pin);
/**
* @brief Feature test: nonzero iff the board has SerialUSB.
*/
-#define BOARD_HAVE_SERIALUSB (defined(BOARD_USB_DISC_DEV) && \
+#define BOARD_HAVE_USB (defined(BOARD_USB_DISC_DEV) && \
defined(BOARD_USB_DISC_BIT))
+#define BOARD_HAVE_SERIALUSB (BOARD_HAVE_USB && \
+ ((defined(USB_TYPE) && USB_TYPE == USB_SERIAL) || !defined(USB_TYPE)))
#endif