USBD_DrvStop
Description
The next function within the device API structure is the device Stop()
function. This function is called once each time a device is stopped.
Files
Every device driver’s usbd_drv.c
Prototype
static void USBD_DrvStop (USBD_DRV *p_drv);
Arguments
p_drv
Pointer to USB device driver structure.
Returned Value
None.
Callers
USB device core layer.
Notes / Warnings
- Typically, the
Stop()
function performs the following operations:- Disable the controller.
- Clear and locally disable interrupts on the hardware device.
- Disconnect from the USB host (e.g, reset the pull-up on the D+ pin). This is generally performed via the device’s BSP function pointer,
Disconn()
, implemented inusbd_bsp_<driver_name>.c
(seeUSBD_BSP_Disconn
).