For production builds, I remove the Serial interface. Is there a way I can tell if Serial exists by checking a macro?
For example, in SDFatConfig.h, I would like to do something like the following:
That USB_SERIAL_DTR is defined in usb_serial.h, but it doesn't seem to be defined when compiling the USBHost_t36.
For example, in SDFatConfig.h, I would like to do something like the following:
Code:
#ifndef USB_SERIAL_DTR
#if ENABLE_ARDUINO_SERIAL == 1
#warning Redefining ENABLE_ARDUINO_SERIAL 0 because Serial is not defined.
#undef ENABLE_ARDUINO_SERIAL
#define ENABLE_ARDUINO_SERIAL 0
#endif
#endif
That USB_SERIAL_DTR is defined in usb_serial.h, but it doesn't seem to be defined when compiling the USBHost_t36.