CMSIS Driver  Version 1.10 - Preliminary
Middleware Driver API for microcontroller peripherals
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
USB Device Interface

Driver API for USB Device Peripheral (Driver_USBD.h) More...

Data Structures

struct  ARM_DRIVER_USBD
 Access structure of the USB Device Driver. More...
 
struct  ARM_USBD_CAPABILITIES
 USB Device Driver Capabilities. More...
 
struct  ARM_USBD_STATE
 USB Device State. More...
 

Typedefs

typedef void(* ARM_USBD_SignalDeviceEvent_t )(ARM_USBD_EVENT event)
 Pointer to ARM_USBD_SignalDeviceEvent : Signal USB Device Event.
 
typedef void(* ARM_USBD_SignalEndpointEvent_t )(uint8_t ep_addr, ARM_USBD_EP_EVENT ep_event)
 Pointer to ARM_USBD_SignalEndpointEvent : Signal USB Endpoint Event.
 

Enumerations

enum  ARM_USBD_SET_ADDRESS_STAGE {
  ARM_USBD_SET_ADDRESS_SETUP,
  ARM_USBD_SET_ADDRESS_STATUS
}
 USB Device SET_ADDRESS Stage. More...
 
enum  ARM_USBD_STATUS {
  ARM_USBD_OK = 0,
  ARM_USBD_ERROR = 1
}
 USB Device Status of executed operation. More...
 
enum  ARM_USBD_EVENT {
  ARM_USBD_EVENT_POWER_ON,
  ARM_USBD_EVENT_POWER_OFF,
  ARM_USBD_EVENT_CONNECT,
  ARM_USBD_EVENT_DISCONNECT,
  ARM_USBD_EVENT_RESET,
  ARM_USBD_EVENT_HIGH_SPEED,
  ARM_USBD_EVENT_SUSPEND,
  ARM_USBD_EVENT_RESUME,
  ARM_USBD_EVENT_REMOTE_WAKEUP
}
 USB Device Event. More...
 
enum  ARM_USBD_EP_EVENT {
  ARM_USBD_EP_EVENT_SETUP,
  ARM_USBD_EP_EVENT_OUT,
  ARM_USBD_EP_EVENT_IN
}
 USB Endpoint Event. More...
 

Functions

ARM_DRV_VERSION ARM_USBD_GetVersion (void)
 Get driver version.
 
ARM_USBD_CAPABILITIES ARM_USBD_GetCapabilities (void)
 Get driver capabilities.
 
ARM_USBD_STATUS ARM_USBD_Initialize (ARM_USBD_SignalDeviceEvent_t cb_device_event, ARM_USBD_SignalEndpointEvent_t cb_endpoint_event)
 Initialize USB Device Interface.
 
ARM_USBD_STATUS ARM_USBD_Uninitialize (void)
 De-initialize USB Device Interface.
 
ARM_USBD_STATUS ARM_USBD_PowerControl (ARM_POWER_STATE state)
 Control USB Device Interface Power.
 
ARM_USBD_STATUS ARM_USBD_DeviceConnect (void)
 Connect USB Device.
 
ARM_USBD_STATUS ARM_USBD_DeviceDisconnect (void)
 Disconnect USB Device.
 
ARM_USBD_STATE ARM_USBD_DeviceGetState (void)
 Get current USB Device State.
 
ARM_USBD_STATUS ARM_USBD_DeviceRemoteWakeup (void)
 Trigger USB Remote Wakeup.
 
ARM_USBD_STATUS ARM_USBD_DeviceSetAddress (uint8_t dev_addr, ARM_USBD_SET_ADDRESS_STAGE stage)
 Set USB Device Address.
 
ARM_USBD_STATUS ARM_USBD_DeviceConfigure (bool configure)
 Configure/unconfigure USB Device.
 
ARM_USBD_STATUS ARM_USBD_EndpointConfigure (uint8_t ep_addr, ARM_USB_ENDPOINT_TYPE ep_type, uint16_t ep_max_packet_size)
 Configure USB Endpoint.
 
ARM_USBD_STATUS ARM_USBD_EndpointUnconfigure (uint8_t ep_addr)
 Unconfigure USB Endpoint.
 
ARM_USBD_STATUS ARM_USBD_EndpointStall (uint8_t ep_addr, bool stall)
 Set/Clear Stall for USB Endpoint.
 
ARM_USBD_STATUS ARM_USBD_EndpointReadStart (uint8_t ep_addr, uint8_t *buf, uint32_t len)
 Start USB Endpoint Read operation.
 
int32_t ARM_USBD_EndpointRead (uint8_t ep_addr, uint8_t *buf, uint32_t len)
 Read data from USB Endpoint.
 
int32_t ARM_USBD_EndpointWrite (uint8_t ep_addr, const uint8_t *buf, uint32_t len)
 Write data to USB Endpoint.
 
ARM_USBD_STATUS ARM_USBD_EndpointAbort (uint8_t ep_addr)
 Abort current USB Endpoint transfer.
 
uint16_t ARM_USBD_GetFrameNumber (void)
 Get current USB Frame Number.
 
void ARM_USBD_SignalDeviceEvent (ARM_USBD_EVENT event)
 Signal USB Device Event.
 
void ARM_USBD_SignalEndpointEvent (uint8_t ep_addr, ARM_USBD_EP_EVENT ep_event)
 Signal USB Endpoint Event. Occurs when Endpoint Read/Write completes.
 

Description

Driver API for USB Device Peripheral (Driver_USBD.h)

USB Device API

The header file Driver_USBD.h defines the API for the USB Device Driver interface used by middleware components. The driver implementation itself is a typical part of the Device Family Pack, which provides entry points to the interface as function pointers in the struct ARM_DRIVER_USBD. This structure can be available several times in each interface to control multiple USBD interfaces.

Header file Driver_USBD.h also defines callback routines that can be categorized as device event callbacks and endpoint event callbacks. Callbacks are called by the driver, in interrupt context when an appropriate event occurs, to signal device related events (ARM_USBD_EVENT) and endpoint related events (ARM_USBD_EP_EVENT).

USB Device Function Call Sequence

To use the USBD driver invoke the API functions in the following order:

msc_inline_mscgraph_1


Data Structure Documentation

struct ARM_DRIVER_USBD

Access structure of the USB Device Driver.

The functions of the USB Device driver are accessed by function pointers. Refer to Driver Functions for overview information.

Each instance of an USBD provides such an access struct. The instance is indicated by a postfix in the symbol name of the access struct, for example:

  • ARM_DRIVER_USBD0 is the name of the access struct of the first instance (no. 0).
  • ARM_DRIVER_USBD1 is the name of the access struct of the second instance (no. 1).

A configuration setting in the middleware allows connecting the middleware to a specific driver instance ARM_DRIVER_USBDn. The default is 0, which connects a middleware to the first instance of a driver.

Note
The struct must remain unchanged.

Data Fields

ARM_DRV_VERSION(* GetVersion )(void)
 Pointer to ARM_USBD_GetVersion : Get driver version.
 
ARM_USBD_CAPABILITIES(* GetCapabilities )(void)
 Pointer to ARM_USBD_GetCapabilities : Get driver capabilities.
 
ARM_USBD_STATUS(* Initialize )(ARM_USBD_SignalDeviceEvent_t cb_device_event, ARM_USBD_SignalEndpointEvent_t cb_endpoint_event)
 Pointer to ARM_USBD_Initialize : Initialize USB Device Interface.
 
ARM_USBD_STATUS(* Uninitialize )(void)
 Pointer to ARM_USBD_Uninitialize : De-initialize USB Device Interface.
 
ARM_USBD_STATUS(* PowerControl )(ARM_POWER_STATE state)
 Pointer to ARM_USBD_PowerControl : Control USB Device Interface Power.
 
ARM_USBD_STATUS(* DeviceConnect )(void)
 Pointer to ARM_USBD_DeviceConnect : Connect USB Device.
 
ARM_USBD_STATUS(* DeviceDisconnect )(void)
 Pointer to ARM_USBD_DeviceDisconnect : Disconnect USB Device.
 
ARM_USBD_STATE(* DeviceGetState )(void)
 Pointer to ARM_USBD_DeviceGetState : Get current USB Device State.
 
ARM_USBD_STATUS(* DeviceRemoteWakeup )(void)
 Pointer to ARM_USBD_DeviceRemoteWakeup : Trigger USB Remote Wakeup.
 
ARM_USBD_STATUS(* DeviceSetAddress )(uint8_t dev_addr, ARM_USBD_SET_ADDRESS_STAGE stage)
 Pointer to ARM_USBD_DeviceSetAddress : Set USB Device Address.
 
ARM_USBD_STATUS(* DeviceConfigure )(bool configure)
 Pointer to ARM_USBD_DeviceConfigure : Configure/unconfigure USB Device.
 
ARM_USBD_STATUS(* EndpointConfigure )(uint8_t ep_addr, ARM_USB_ENDPOINT_TYPE ep_type, uint16_t ep_max_packet_size)
 Pointer to ARM_USBD_EndpointConfigure : Configure USB Endpoint.
 
ARM_USBD_STATUS(* EndpointUnconfigure )(uint8_t ep_addr)
 Pointer to ARM_USBD_EndpointUnconfigure : Unconfigure USB Endpoint.
 
ARM_USBD_STATUS(* EndpointStall )(uint8_t ep_addr, bool stall)
 Pointer to ARM_USBD_EndpointStall : Set/Clear Stall for USB Endpoint.
 
ARM_USBD_STATUS(* EndpointReadStart )(uint8_t ep_addr, uint8_t *buf, uint32_t len)
 Pointer to ARM_USBD_EndpointReadStart : Start USB Endpoint Read operation.
 
int32_t(* EndpointRead )(uint8_t ep_addr, uint8_t *buf, uint32_t len)
 Pointer to ARM_USBD_EndpointRead : Read data from USB Endpoint.
 
int32_t(* EndpointWrite )(uint8_t ep_addr, const uint8_t *buf, uint32_t len)
 Pointer to ARM_USBD_EndpointWrite : Write data to USB Endpoint.
 
ARM_USBD_STATUS(* EndpointAbort )(uint8_t ep_addr)
 Pointer to ARM_USBD_EndpointAbort : Abort current USB Endpoint transfer.
 
uint16_t(* GetFrameNumber )(void)
 Pointer to ARM_USBD_GetFrameNumber : Get current USB Frame Number.
 

Field Documentation

ARM_USBD_STATUS(* DeviceConfigure)(bool configure)

Pointer to ARM_USBD_DeviceConfigure : Configure/unconfigure USB Device.

ARM_USBD_STATUS(* DeviceConnect)(void)

Pointer to ARM_USBD_DeviceConnect : Connect USB Device.

ARM_USBD_STATUS(* DeviceDisconnect)(void)

Pointer to ARM_USBD_DeviceDisconnect : Disconnect USB Device.

ARM_USBD_STATE(* DeviceGetState)(void)

Pointer to ARM_USBD_DeviceGetState : Get current USB Device State.

ARM_USBD_STATUS(* DeviceRemoteWakeup)(void)

Pointer to ARM_USBD_DeviceRemoteWakeup : Trigger USB Remote Wakeup.

ARM_USBD_STATUS(* DeviceSetAddress)(uint8_t dev_addr, ARM_USBD_SET_ADDRESS_STAGE stage)

Pointer to ARM_USBD_DeviceSetAddress : Set USB Device Address.

ARM_USBD_STATUS(* EndpointAbort)(uint8_t ep_addr)

Pointer to ARM_USBD_EndpointAbort : Abort current USB Endpoint transfer.

ARM_USBD_STATUS(* EndpointConfigure)(uint8_t ep_addr, ARM_USB_ENDPOINT_TYPE ep_type, uint16_t ep_max_packet_size)

Pointer to ARM_USBD_EndpointConfigure : Configure USB Endpoint.

int32_t(* EndpointRead)(uint8_t ep_addr, uint8_t *buf, uint32_t len)

Pointer to ARM_USBD_EndpointRead : Read data from USB Endpoint.

ARM_USBD_STATUS(* EndpointReadStart)(uint8_t ep_addr, uint8_t *buf, uint32_t len)

Pointer to ARM_USBD_EndpointReadStart : Start USB Endpoint Read operation.

ARM_USBD_STATUS(* EndpointStall)(uint8_t ep_addr, bool stall)

Pointer to ARM_USBD_EndpointStall : Set/Clear Stall for USB Endpoint.

ARM_USBD_STATUS(* EndpointUnconfigure)(uint8_t ep_addr)

Pointer to ARM_USBD_EndpointUnconfigure : Unconfigure USB Endpoint.

int32_t(* EndpointWrite)(uint8_t ep_addr, const uint8_t *buf, uint32_t len)

Pointer to ARM_USBD_EndpointWrite : Write data to USB Endpoint.

ARM_USBD_CAPABILITIES(* GetCapabilities)(void)

Pointer to ARM_USBD_GetCapabilities : Get driver capabilities.

uint16_t(* GetFrameNumber)(void)

Pointer to ARM_USBD_GetFrameNumber : Get current USB Frame Number.

ARM_DRV_VERSION(* GetVersion)(void)

Pointer to ARM_USBD_GetVersion : Get driver version.

ARM_USBD_STATUS(* Initialize)(ARM_USBD_SignalDeviceEvent_t cb_device_event, ARM_USBD_SignalEndpointEvent_t cb_endpoint_event)

Pointer to ARM_USBD_Initialize : Initialize USB Device Interface.

ARM_USBD_STATUS(* PowerControl)(ARM_POWER_STATE state)

Pointer to ARM_USBD_PowerControl : Control USB Device Interface Power.

ARM_USBD_STATUS(* Uninitialize)(void)

Pointer to ARM_USBD_Uninitialize : De-initialize USB Device Interface.

struct ARM_USBD_CAPABILITIES

USB Device Driver Capabilities.

A USB Device driver can be implemented with different capabilities. The bitfield members of this struct encode the capabilities implemented by this driver.

Returned by:

Note
The struct must remain unchanged.
Data Fields
uint32_t event_connect: 1 Signal Connect event.
uint32_t event_disconnect: 1 Signal Disconnect event.
uint32_t event_high_speed: 1 Signal switch to High-speed event.
uint32_t event_power_off: 1 Signal Power Off event.
uint32_t event_power_on: 1 Signal Power On event.
uint32_t event_remote_wakeup: 1 Signal Remote Wakeup event.
uint32_t event_reset: 1 Signal Reset event.
uint32_t event_resume: 1 Signal Resume event.
uint32_t event_suspend: 1 Signal Suspend event.
uint32_t reserved: 23 reserved for future use
struct ARM_USBD_STATE

USB Device State.

This structure stores information about the state of a USB Device. The bitfields encode whether the device is active, connected, and powered. Finally, it stores the established speed.

Returned by:

Data Fields
uint8_t active: 1 USB Device active lag.
uint8_t connected: 1 USB Device connected flag.
uint8_t powered: 1 USB Device powered flag.
uint8_t speed: 2 USB Device speed setting.

Typedef Documentation

ARM_USBD_SignalDeviceEvent_t

Pointer to ARM_USBD_SignalDeviceEvent : Signal USB Device Event.

Provides the typedef for the callback function ARM_USBD_SignalDeviceEvent.

Parameter for:

ARM_USBD_SignalEndpointEvent_t

Pointer to ARM_USBD_SignalEndpointEvent : Signal USB Endpoint Event.

Provides the typedef for the callback function ARM_USBD_SignalEndpointEvent.

Parameter for:

Enumeration Type Documentation

USB Endpoint Event.

Provides the event information for the ARM_USBD_SignalEndpointEvent callback function (which is registered by the function ARM_USBD_Initialize).

Parameter for:

Enumerator:
ARM_USBD_EP_EVENT_SETUP 

SETUP Packet.

ARM_USBD_EP_EVENT_OUT 

OUT Packet.

ARM_USBD_EP_EVENT_IN 

IN Packet.

USB Device Event.

Provides the event information for the ARM_USBD_SignalDeviceEvent callback function (which is registered by the function ARM_USBD_Initialize). The function ARM_USBD_GetCapabilities returns information of the implemented callback events in a driver.

Parameter for:

Enumerator:
ARM_USBD_EVENT_POWER_ON 

USB Device Power On.

ARM_USBD_EVENT_POWER_OFF 

USB Device Power Off.

ARM_USBD_EVENT_CONNECT 

USB Device connected.

ARM_USBD_EVENT_DISCONNECT 

USB Device disconnected.

ARM_USBD_EVENT_RESET 

USB Reset occurred.

ARM_USBD_EVENT_HIGH_SPEED 

USB switch to High Speed occurred.

ARM_USBD_EVENT_SUSPEND 

USB Suspend occurred.

ARM_USBD_EVENT_RESUME 

USB Resume occurred.

ARM_USBD_EVENT_REMOTE_WAKEUP 

USB Remote wakeup.

USB Device SET_ADDRESS Stage.

Provides values for

Parameter for:

Enumerator:
ARM_USBD_SET_ADDRESS_SETUP 
ARM_USBD_SET_ADDRESS_STATUS 

USB Device Status of executed operation.

Defines status and error codes returned by most of the USBD driver functions.

Returned by:

Enumerator:
ARM_USBD_OK 

USBD Status: Operation succeeded.

ARM_USBD_ERROR 

USBD Status: Unspecified error.

Function Documentation

ARM_USBD_STATUS ARM_USBD_DeviceConfigure ( bool  configure)

Configure/unconfigure USB Device.

Parameters
[in]configureOperation
  • false Unconfigure
  • true Configure
Returns
execution status ARM_USBD_STATUS
ARM_USBD_STATUS ARM_USBD_DeviceConnect ( void  )

Connect USB Device.

Returns
execution status ARM_USBD_STATUS
ARM_USBD_STATUS ARM_USBD_DeviceDisconnect ( void  )

Disconnect USB Device.

Returns
execution status ARM_USBD_STATUS
ARM_USBD_STATE ARM_USBD_DeviceGetState ( void  )

Get current USB Device State.

Returns
execution status ARM_USBD_STATE
ARM_USBD_STATUS ARM_USBD_DeviceRemoteWakeup ( void  )

Trigger USB Remote Wakeup.

Returns
execution status ARM_USBD_STATUS
ARM_USBD_STATUS ARM_USBD_DeviceSetAddress ( uint8_t  dev_addr,
ARM_USBD_SET_ADDRESS_STAGE  stage 
)

Set USB Device Address.

Parameters
[in]dev_addrDevice Address
[in]stageStage in which the function is called
Returns
execution status ARM_USBD_STATUS
ARM_USBD_STATUS ARM_USBD_EndpointAbort ( uint8_t  ep_addr)

Abort current USB Endpoint transfer.

Parameters
[in]ep_addrEndpoint Address
  • ep_addr.0..3: Address
  • ep_addr.7: Direction
Returns
execution status ARM_USBD_STATUS
ARM_USBD_STATUS ARM_USBD_EndpointConfigure ( uint8_t  ep_addr,
ARM_USB_ENDPOINT_TYPE  ep_type,
uint16_t  ep_max_packet_size 
)

Configure USB Endpoint.

Parameters
[in]ep_addrEndpoint Address
  • ep_addr.0..3: Address
  • ep_addr.7: Direction
[in]ep_typeEndpoint Type
[in]ep_max_packet_sizeEndpoint Maximum Packet Size
Returns
execution status ARM_USBD_STATUS
int32_t ARM_USBD_EndpointRead ( uint8_t  ep_addr,
uint8_t *  buf,
uint32_t  len 
)

Read data from USB Endpoint.

Parameters
[in]ep_addrEndpoint Address
  • ep_addr.0..3: Address
  • ep_addr.7: Direction
[out]bufBuffer for data read from Endpoint
[in]lenBuffer length
Returns
number of data bytes read or execution status
  • value >= 0: number of data bytes read
  • value < 0: error occurred, -value is execution status as defined with ARM_USBD_STATUS
ARM_USBD_STATUS ARM_USBD_EndpointReadStart ( uint8_t  ep_addr,
uint8_t *  buf,
uint32_t  len 
)

Start USB Endpoint Read operation.

Parameters
[in]ep_addrEndpoint Address
  • ep_addr.0..3: Address
  • ep_addr.7: Direction
[out]bufBuffer for data read from Endpoint
[in]lenBuffer length
Returns
execution status ARM_USBD_STATUS
ARM_USBD_STATUS ARM_USBD_EndpointStall ( uint8_t  ep_addr,
bool  stall 
)

Set/Clear Stall for USB Endpoint.

Parameters
[in]ep_addrEndpoint Address
  • ep_addr.0..3: Address
  • ep_addr.7: Direction
[in]stallOperation
  • false Clear
  • true Set
Returns
execution status ARM_USBD_STATUS
ARM_USBD_STATUS ARM_USBD_EndpointUnconfigure ( uint8_t  ep_addr)

Unconfigure USB Endpoint.

Parameters
[in]ep_addrEndpoint Address
  • ep_addr.0..3: Address
  • ep_addr.7: Direction
Returns
execution status ARM_USBD_STATUS
int32_t ARM_USBD_EndpointWrite ( uint8_t  ep_addr,
const uint8_t *  buf,
uint32_t  len 
)

Write data to USB Endpoint.

Parameters
[in]ep_addrEndpoint Address
  • ep_addr.0..3: Address
  • ep_addr.7: Direction
[in]bufBuffer with data to write to Endpoint
[in]lenBuffer length
Returns
number of data bytes written or execution status
  • value >= 0: number of data bytes written
  • value < 0: error occurred, -value is execution status as defined with ARM_USBD_STATUS
ARM_USBD_CAPABILITIES ARM_USBD_GetCapabilities ( void  )

Get driver capabilities.

Returns
ARM_USBD_CAPABILITIES

Retrieves information about capabilities in this driver implementation. The bitfield members of the struct ARM_USBD_CAPABILITIES encode various capabilities, for example if the hardware can create signal events using the ARM_USBD_SignalDeviceEvent callback function.

Example:

extern ARM_DRIVER_USBD ARM_Driver_USBD0;
ARM_DRIVER_USBD *drv_info;
void read_capabilities (void) {
ARM_USBD_CAPABILITIES drv_capabilities;
drv_info = &ARM_Driver_USBD0;
drv_capablilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
uint16_t ARM_USBD_GetFrameNumber ( void  )

Get current USB Frame Number.

Returns
Frame Number
ARM_DRV_VERSION ARM_USBD_GetVersion ( void  )

Get driver version.

Returns
ARM_DRV_VERSION

Returns version information of the driver implementation in ARM_DRV_VERSION

  • API version is the version of the CMSIS-Driver specification used to implement this driver.
  • Driver version is source code version of the actual driver implementation.

Example:

extern ARM_DRIVER_USBD ARM_Driver_USBD0;
ARM_DRIVER_USBD *drv_info;
void setup_usbd (void) {
ARM_DRV_VERSION version;
drv_info = &ARM_Driver_USBD0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
ARM_USBD_STATUS ARM_USBD_Initialize ( ARM_USBD_SignalDeviceEvent_t  cb_device_event,
ARM_USBD_SignalEndpointEvent_t  cb_endpoint_event 
)

Initialize USB Device Interface.

Parameters
[in]cb_device_eventPointer to ARM_USBD_SignalDeviceEvent
[in]cb_endpoint_eventPointer to ARM_USBD_SignalEndpointEvent
Returns
execution status ARM_USBD_STATUS

The function initializes the USB Device interface. It is called when the middleware component starts operation.

The function performs the following operations:

The parameter cb_device_event is a pointer to the ARM_USBD_SignalDeviceEvent callback function; use a NULL pointer when no device callback signals are required.

The parameter cb_endpoint_event is a pointer to the ARM_USBD_SignalEndpointEvent callback function; use a NULL pointer when no endpoint callback signals are required.

Example:

ARM_USBD_STATUS ARM_USBD_PowerControl ( ARM_POWER_STATE  state)

Control USB Device Interface Power.

Parameters
[in]statePower state
Returns
execution status ARM_USBD_STATUS
void ARM_USBD_SignalDeviceEvent ( ARM_USBD_EVENT  event)

Signal USB Device Event.

Parameters
[in]eventARM_USBD_EVENT
Returns
none
void ARM_USBD_SignalEndpointEvent ( uint8_t  ep_addr,
ARM_USBD_EP_EVENT  ep_event 
)

Signal USB Endpoint Event. Occurs when Endpoint Read/Write completes.

Parameters
[in]ep_addrEndpoint Address ep_addr.0..3: Address ep_addr.7: Direction
[in]ep_eventARM_USBD_EP_EVENT
Returns
none
ARM_USBD_STATUS ARM_USBD_Uninitialize ( void  )

De-initialize USB Device Interface.

Returns
execution status ARM_USBD_STATUS

The function ARM_USBD_Uninitialize de-initializes the resources of USBD interface and sets the peripheral to ARM_POWER_OFF power mode.

It is called when the middleware component stops operation and releases the software resources used by the interface.