/
USBD_DrvEP_Open
USBD_DrvEP_Open
Description
Open and configure a device endpoint, given its characteristics (e.g., endpoint type, endpoint address, maximum packet size, etc).
Files
Every device driver’s usbd_drv.c
Prototype
static void USBD_DrvEP_Open (USBD_DEV *p_drv, CPU_INT08U ep_addr, CPU_INT08U ep_type, CPU_INT16U max_pkt_size, CPU_INT08U transaction_frame, USBD_ERR *p_err);
Arguments
p_drv
Pointer to USB device driver structure.
ep_addr
Endpoint address.
ep_type
Endpoint type:
USB_EP_TYPE_CTRL,
USB_EP_TYPE_ISOC,
USB_EP_TYPE_BULK,
USB_EP_TYPE_INTR.
max_pkt_size
Maximum packet size.
transaction_frame
Endpoint transactions per frame.
p_err
Pointer to variable that will receive the return error code from this function.
Returned Value
None.
Callers
USB device core layer.
Notes / Warnings
- Typically, the endpoint open function performs the following operations:
- Configure endpoint information in the device controller. This may include not only assigning the type and maximum packet size, but also making certain that the endpoint is successfully configured (or realized or mapped). For some device controllers, this may not be necessary.
max_pkt_size
is the maximum packet size the endpoint can send or receive.
Related content
USBD_DrvEP_Tx
USBD_DrvEP_Tx
More like this
USBD_DrvEP_TxStart
USBD_DrvEP_TxStart
More like this
USBD_DrvEP_RxStart
USBD_DrvEP_RxStart
More like this
USBD_DrvEP_RxZLP
USBD_DrvEP_RxZLP
More like this
USBD_DrvEP_Rx
USBD_DrvEP_Rx
More like this
USBD_DrvEP_TxZLP
USBD_DrvEP_TxZLP
More like this