#endif\r
\r
/** Detaches the device from the USB bus. This has the effect of removing the device from any\r
- * host if, ceasing USB communications. If no host is present, this prevents any host from\r
+ * attached host, ceasing USB communications. If no host is present, this prevents any host from\r
* enumerating the device once attached until \ref USB_Attach() is called.\r
*/\r
#define USB_Detach() MACROS{ UDCON |= (1 << DETACH); }MACROE\r
* changed in value.\r
*/\r
extern volatile uint8_t USB_CurrentMode;\r
+ #elif defined(USB_HOST_ONLY)\r
+ #define USB_CurrentMode USB_MODE_HOST\r
+ #elif defined(USB_DEVICE_ONLY)\r
+ #define USB_CurrentMode USB_MODE_DEVICE\r
#endif\r
\r
#if !defined(USE_STATIC_OPTIONS) || defined(__DOXYGEN__)\r
* changed in value.\r
*/\r
extern volatile uint8_t USB_Options;\r
+ #elif defined(USE_STATIC_OPTIONS)\r
+ #define USB_Options USE_STATIC_OPTIONS\r
#endif\r
\r
/* Private Interface - For use in library only: */\r
#define USB_CLK_Freeze() MACROS{ USBCON |= (1 << FRZCLK); }MACROE\r
#define USB_CLK_Unfreeze() MACROS{ USBCON &= ~(1 << FRZCLK); }MACROE\r
\r
- #define USB_Interface_Enable() MACROS{ USBCON |= (1 << USBE); }MACROE\r
- #define USB_Interface_Disable() MACROS{ USBCON &= ~(1 << USBE); }MACROE\r
- #define USB_Interface_Reset() MACROS{ uint8_t Temp = USBCON; USBCON = (Temp & ~(1 << USBE)); \\r
+ #define USB_Controller_Enable() MACROS{ USBCON |= (1 << USBE); }MACROE\r
+ #define USB_Controller_Disable() MACROS{ USBCON &= ~(1 << USBE); }MACROE\r
+ #define USB_Controller_Reset() MACROS{ const uint8_t Temp = USBCON; USBCON = (Temp & ~(1 << USBE)); \\r
USBCON = (Temp | (1 << USBE)); }MACROE\r
\r
/* Inline Functions: */\r