Silicon Laboratories SiM3U1xx Bedienungsanleitung Seite 21

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 30
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 20
AN758
Rev. 0.1 21
5.4.6. USB_Init
USB hardware initialization.
Syntax
void USB_Init(const uint8_t Options)
Parameters
Options: USB Device Mode Option
Return Value
None
Description
This function initializes USB hardware. Set full or low speed. Turn on USB 48 MHz oscillators. Enable USB
interrupt. Configure Endpoint to default state. Enable internal pull up resistor to attach USB device.
Example
USB_Init(USB_DEVICE_OPT_FULLSPEED);
5.4.7. USB0_IRQHandler
USB interrupt handler.
Syntax
void USB0_IRQHandler(void)
Parameters
None
Return Value
None
Description
This function handles all enabled USB device interrupt. Clear interrupt flag. Execute handler function.
Example
When USB interrupt happened, PC will jump to vector table and then jump into this function.
5.4.8. USB0_ep0_handler
Handle endpoint 0 request.
Syntax
void USB0_ep0_handler(void)
Parameters
None
Return Value
None
Description
This function handles all endpoint 0 request.
Example
if (usbEpInterruptMask & SI32_USB_A_IOINT_EP0I_MASK)
{
USB0_ep0_handler();
return;
}
Seitenansicht 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 29 30

Kommentare zu diesen Handbüchern

Keine Kommentare