X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/8b053d6ba5dddc5f00fb52873185a2350bef5ce8..ac0ece0141fe9470539380fb5e5f069a0ff701ff:/LUFA/Drivers/USB/LowLevel/Device.h diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h index b595564a6..c6c2e9fdd 100644 --- a/LUFA/Drivers/USB/LowLevel/Device.h +++ b/LUFA/Drivers/USB/LowLevel/Device.h @@ -98,13 +98,18 @@ * issued if the host is currently allowing remote wakeup events from the device (i.e., * the \ref USB_RemoteWakeupEnabled flag is set). When the NO_DEVICE_REMOTE_WAKEUP compile * time option is used, this macro is unavailable. + * \n + * + * \note The USB clock must be running for this function to operate. If the stack is initialized with + * the \ref USB_OPT_MANUAL_PLL option enabled, the user must ensure that the PLL is running + * before attempting to call this function. * * \see \ref Group_Descriptors for more information on the RMWAKEUP feature and device descriptors. */ void USB_Device_SendRemoteWakeup(void); /* Pseudo-Function Macros: */ - #if defined(__DOXYGEN__) + #if defined(__DOXYGEN__) /** Enables the device mode Start Of Frame events. When enabled, this causes the * \ref EVENT_USB_Device_StartOfFrame() event to fire once per millisecond, synchronized to the USB bus, * at the start of each USB frame when enumerated in device mode. @@ -176,18 +181,22 @@ * * \return Size in bytes of the descriptor if it exists, zero or \ref NO_DESCRIPTOR otherwise. */ - uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress + uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress #if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS) , uint8_t* MemoryAddressSpace - #endif - ) - ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); + #endif + ) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) - /* Macros: */ - #define USB_Device_SetLowSpeed() MACROS{ UDCON |= (1 << LSM); }MACROE - #define USB_Device_SetFullSpeed() MACROS{ UDCON &= ~(1 << LSM); }MACROE + /* Macros: */ + #define USB_Device_SetLowSpeed() MACROS{ UDCON |= (1 << LSM); }MACROE + #define USB_Device_SetFullSpeed() MACROS{ UDCON &= ~(1 << LSM); }MACROE + + #define USB_Device_SetDeviceAddress(addr) MACROS{ UDADDR = ((1 << ADDEN) | (addr & 0x7F)); }MACROE + #endif #endif