*/
#define USB_DEVICE_OPT_LOWSPEED (1 << 0)
- /** Mask for the Options parameter of the \ref USB_Init() function. This indicates that the
- * USB interface should be initialized in full speed (12Mb/s) mode.
- */
- #define USB_DEVICE_OPT_FULLSPEED (0 << 0)
+ #if (F_USB > 6000000)
+ /** Mask for the Options parameter of the \ref USB_Init() function. This indicates that the
+ * USB interface should be initialized in full speed (12Mb/s) mode.
+ */
+ #define USB_DEVICE_OPT_FULLSPEED (0 << 0)
+ #endif
//@}
#if (!defined(NO_INTERNAL_SERIAL) || defined(__DOXYGEN__))
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint16_t USB_Device_GetFrameNumber(void)
{
- return USB_EndpointTable.FrameNum;
+ return ((USB_EndpointTable_t*)USB.EPPTR)->FrameNum;
}
#if !defined(NO_SOF_EVENTS)