From f16f6a54383c6cabc98b1b6cb8ee8e8d1db76926 Mon Sep 17 00:00:00 2001 From: mlundinse Date: Fri, 3 May 2013 22:15:35 +0200 Subject: 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 --- wirish/include/wirish/boards.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wirish') 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 -- cgit v1.2.3