4.4.3.1.3 Functions
RETURN_CODE_t USB_SetupProcess (USB_SETUP_REQUEST_t *setupRequestPtr)
Setup function for the Standard Device Request USB 2.0 Specification Ch 9.4.
RETURN_CODE_t USB_Start (void)
Starts the USB peripheral, configures the callbacks and attaches it to the bus.
RETURN_CODE_t USB_Stop (void)
Stops the USB peripheral and detaches it from the bus.
RETURN_CODE_t USB_Reset (void)
Resets the USB peripheral.
RETURN_CODE_t USB_DescriptorPointersSet (USB_DESCRIPTOR_POINTERS_t *descriptorPtr)
Handles Descriptor pointer setup. Sets the address to the application descriptor pointers. Checks if the device pointer and a pointer to the start of the application configuration(s) are set before saving the address to the USB Core Stack.
RETURN_CODE_t USB_DescriptorConfigurationEnable (uint8_t configurationValue)
Enables endpoint configuration descriptor.
bool USB_DescriptorActiveConfigurationSelfPoweredGet (void)
Gets the Self-Powered setting from the active configuration.
bool USB_DescriptorActiveConfigurationRemoteWakeupGet (void)
Gets the Remote Wake-up setting from the active configuration.
uint8_t USB_DescriptorActiveConfigurationValueGet (void)
Gets the active configuration value.
RETURN_CODE_t USB_DescriptorInterfaceConfigure (uint8_t interfaceNumber, uint8_t alternateSetting, bool enable)
Enables or Disables an Interface Descriptor.
RETURN_CODE_t USB_DescriptorPointerGet (USB_DESCRIPTOR_TYPE_t descriptor, uint8_t attribute, uint8_t **descriptorPtr, uint16_t *descriptorLength)
Gets the pointer to the descriptor.
RETURN_CODE_t USB_DescriptorStringPointerGet (uint8_t stringIndex, uint16_t langID, uint8_t **descriptorAddressPtr, uint16_t *descriptorLength)
Gets the pointer to the string descriptor.
RETURN_CODE_t ActiveAlternateSettingGet (uint8_t interfaceNumber, uint8_t *alternateSetting)
Get the active alternate interface number for an interface.
RETURN_CODE_t ActiveAlternateSettingSet (uint8_t interfaceNumber, uint8_t alternateSetting)
Set the active alternate interface number for an interface.
RETURN_CODE_t ConfigurationPointerGet (uint8_t configurationValue, USB_CONFIGURATION_DESCRIPTOR_t **configurationPtr)
Collects the configuration pointer.
RETURN_CODE_t DescriptorEndpointsConfigure (USB_INTERFACE_DESCRIPTOR_t *interfacePtr, bool enable)
Configures the endpoints as given in the descriptor.
RETURN_CODE_t NextDescriptorPointerGet (USB_DESCRIPTOR_TYPE_t descriptorType, USB_DESCRIPTOR_HEADER_t **descriptorHeaderPtr)
Gets the next descriptor.
RETURN_CODE_t USB_EventHandler (void)
Handles the different types of events.
void USB_SetConfigurationCallbackRegister (USB_SETUP_EVENT_CALLBACK_t callback)
Registers a callback for Set Configuration requests.
void USB_SetInterfaceCallbackRegister (USB_SETUP_EVENT_CALLBACK_t callback)
Registers a callback for Set Interface requests.
void USB_InterfaceDisabledCallbackRegister (USB_EVENT_CALLBACK_t callback)
Registers a callback for disabling interfaces.
void USB_VendorRequestCallbackRegister (USB_SETUP_PROCESS_CALLBACK_t callback)
Registers a callback for vendor requests.
void USB_ClassRequestCallbackRegister (USB_SETUP_PROCESS_CALLBACK_t callback)
Registers a callback for class requests.
void USB_OtherRequestCallbackRegister (USB_SETUP_PROCESS_CALLBACK_t callback)
Registers a callback for other requests.
void USB_SOFCallbackRegister (USB_EVENT_CALLBACK_t callback)
Registers a callback for Start-Of-Frame (SOF) events.
void USB_ResetCallbackRegister (USB_EVENT_CALLBACK_t callback)
Registers a callback for Reset events.
void USB_SuspendCallbackRegister (USB_EVENT_CALLBACK_t callback)
Registers a callback for Suspend events.
void USB_ResumeCallbackRegister (USB_EVENT_CALLBACK_t callback)
Registers a callback for Resume events.