4.6.37.1 Functions
bool USB_SetupIsReceived (void)
Detects if the Setup event was received.
bool USB_EventSOFIsReceived (void)
Detects if the Start-of-Frame (SOF) event was received.
void USB_EventSOFClear (void)
Clears the SOF event.
bool USB_EventResetIsReceived (void)
Detects if the Reset event was received.
void USB_EventResetClear (void)
Clears the Reset event.
uint8_t USB_EventOverUnderflowIsReceived (void)
Detects if an Overflow and/or Underflow event was received.
uint8_t USB_ControlOverUnderflowIsReceived (void)
Detects if an Overflow and/or Underflow event was received on the control endpoints.
void USB_EventOverUnderflowClear (void)
Clears the Over/Underflow event.
bool USB_EventSuspendIsReceived (void)
Detects if a Suspend event was received.
void USB_EventSuspendClear (void)
Clears the Suspend event.
bool USB_EventResumeIsReceived (void)
Detects if a Resume event was received.
void USB_EventResumeClear (void)
Clears the Resume event.
bool USB_EventStalledIsReceived (void)
Detects if a Stalled event was received.
void USB_EventStalledClear (void)
Clears the Stalled event.
void USB_BusAttach (void)
Attaches the device to the USB bus.
void USB_BusDetach (void)
Detaches the device from the USB bus.
bool USB_IsBusAttached (void)
Checks if the device is attached to the USB bus not.
void USB_DeviceAddressConfigure (uint8_t deviceAddress)
Sets the device address.
uint16_t USB_FrameNumberGet (void)
Gets the current frame number.
RETURN_CODE_t USB_ControlEndpointsInit (void)
Ensures correct control endpoint initialization.
RETURN_CODE_t USB_ControlSetupReceived (void)
Verifies the received control setup.
RETURN_CODE_t USB_ControlTransactionComplete (USB_PIPE_t pipe)
Handles completed transactions on the control endpoints. Checks and verifies data OUT, data IN, ZLP OUT and ZLP IN.
RETURN_CODE_t USB_ControlTransferZLP (uint8_t direction)
Sends ZLP OUT and ZLP IN transactions on the control endpoints.
RETURN_CODE_t USB_ControlTransferReset (void)
Ensures correct control transfer reset.
RETURN_CODE_t USB_ControlTransferDataSet (uint8_t *dataPtr, uint16_t dataSize)
Updates the transfer data pointer and size in ControlTransfer.
RETURN_CODE_t USB_ControlTransferDataWriteBuffer (uint8_t *dataPtr, uint8_t dataSize)
Copies data to the transfer buffer and sets the transfer data pointer and size in ControlTransfer.
void USB_ControlEndOfRequestCallbackRegister (USB_SETUP_ENDOFREQUEST_CALLBACK_t callback)
Sets the callback for end of a control request.
void USB_ControlProcessSetupCallbackRegister (USB_SETUP_PROCESS_CALLBACK_t callback)
Sets the callback for the setup processing.
void USB_ControlOverUnderRunCallbackRegister (USB_SETUP_OVERUNDERRUN_CALLBACK_t callback)
Sets the callback for a control overrun or underrun.
RETURN_CODE_t USB_ControlProcessOverUnderflow (uint8_t overunderflow)
Handles the control Over/Underflow events.
RETURN_CODE_t USB_HandleEventStalled (USB_PIPE_t pipe)
Handles the Stall events.
void USB_PeripheralInitialize (void)
Enables the peripheral and the frame number, enables and resets FIFO, sets the endpoint table address and max endpoints.
void USB_PeripheralDisable (void)
Disables the USB peripheral and aborts any ongoing transaction.