Some more thoughts on USB and defines/buildflags.
Presently the main control of USB in the build is done for the libmaple parts
that are processor but not board specific, by having the usb_lib structures in
usb_cdcacm.c defined as _weak so they can be overridden. For the board specific
wirish part by BOARD_HAVE_SERIALUSB defined in boards.h and then used by usb_serial.cpp
and boards_setup.cpp.
I suggets that we:
Use the USB_TYPE flag to control what usb device library gets built.
Rename BOARD_HAVE_SERIALUSB to BOARD_HAVE_USB and implement BOARD_HAVE_SERIALUSB
as BOARD_HAVE_USB && ((defined(USB_TYPE) && (USB_TYPE == USB_SERIAL)) || !defined(USB_TYPE))
I think will give us easier control over what gets built and makes it easier to add
more USB device functionality.
Comments ?
Reagrds
Magnus