|
|
|
|
|
|
|
|
#ifndef USBserial_h_ |
|
|
#ifndef USBserial_h_ |
|
|
#define USBserial_h_ |
|
|
#define USBserial_h_ |
|
|
|
|
|
|
|
|
#if defined(USB_SERIAL) || defined(USB_SERIAL_HID) |
|
|
|
|
|
|
|
|
#if (F_CPU >= 20000000) && (defined(USB_SERIAL) || defined(USB_SERIAL_HID)) |
|
|
|
|
|
|
|
|
#include <inttypes.h> |
|
|
#include <inttypes.h> |
|
|
|
|
|
|
|
|
#if F_CPU >= 20000000 |
|
|
|
|
|
|
|
|
|
|
|
// C language implementation |
|
|
// C language implementation |
|
|
#ifdef __cplusplus |
|
|
#ifdef __cplusplus |
|
|
extern "C" { |
|
|
extern "C" { |
|
|
|
|
|
|
|
|
#endif // __cplusplus |
|
|
#endif // __cplusplus |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#else // F_CPU < 20 MHz |
|
|
|
|
|
|
|
|
#else // F_CPU < 20 MHz && !(USB_SERIAL || USB_SERIAL_HID) |
|
|
|
|
|
|
|
|
// Allow Arduino programs using Serial to compile, but Serial will do nothing. |
|
|
// Allow Arduino programs using Serial to compile, but Serial will do nothing. |
|
|
#ifdef __cplusplus |
|
|
#ifdef __cplusplus |
|
|
|
|
|
|
|
|
extern void serialEvent(void); |
|
|
extern void serialEvent(void); |
|
|
#endif // __cplusplus |
|
|
#endif // __cplusplus |
|
|
|
|
|
|
|
|
#endif // F_CPU |
|
|
|
|
|
|
|
|
|
|
|
#endif // USB_SERIAL || USB_SERIAL_HID |
|
|
|
|
|
|
|
|
#endif // F_CPU && USB_SERIAL || USB_SERIAL_HID |
|
|
|
|
|
|
|
|
#endif // USBserial_h_ |
|
|
#endif // USBserial_h_ |