Silicon Laboratories SiM3U1xx Uživatelský manuál Strana 20

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 30
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 19
AN758
20 Rev. 0.1
5.4.3. USB_Device_SetFullSpeed
Set USB device as full speed.
Syntax
static inline void USB_Device_SetFullSpeed(void)
Parameters
None
Return Value
None
Description
This function set USB device as Full speed.
Example
if (USB_Options & USB_DEVICE_OPT_LOWSPEED)
{
USB_Device_SetLowSpeed();
}
else
{
USB_Device_SetFullSpeed();
}
5.4.4. USB_Device_SetDeviceAddress
Set USB device address.
Syntax
static inline void USB_Device_SetDeviceAddress(const uint8_t Address)
Parameters
Address: USB address
Return Value
None
Description
This function set USB device address assigned from USB host .
Example
uint8_t DeviceAddress = (USB_ControlRequest.wValue & 0x7F);
USB_Device_SetDeviceAddress(DeviceAddress);
5.4.5. USB_Device_IsAddressSet
Check USB device address assigned or not.
Syntax
static inline bool USB_Device_IsAddressSet(void)
Parameters
None
Return Value
USB device address
Description
This function USB device address assigned or not.
Example
USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Configured :
DEVICE_STATE_Powered;
Zobrazit stránku 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 29 30

Komentáře k této Příručce

Žádné komentáře