C
void USBEnableEndpoint( BYTE ep, BYTE options );
Description
This function will enable the specified endpoint with the specified options.
Typical Usage:
void USBCBInitEP(void) { USBEnableEndpoint(MSD_DATA_IN_EP,USB_IN_ENABLED|USB_OUT_ENABLED|USB_HANDSHAKE_ENABLED|USB_DISALLOW_SETUP); USBMSDInit(); }
In the above example endpoint number MSD_DATA_IN_EP is being configured for both IN and OUT traffic with handshaking enabled. Also since MSD_DATA_IN_EP is not endpoint 0 (MSD does not allow this), then we can explicitly disable SETUP packets on this endpoint.
Preconditions
None
Parameters
Parameters |
Description |
BYTE ep |
the endpoint to be configured |
BYTE options |
optional settings for the endpoint. The options should be ORed together to form a single options string. The available optional settings for the endpoint. The options should be ORed together to form a single options string. The available options are the following:
|
Returns
None
Remarks
None
MCHPFSUSB Device Library > Stack > Public API Members > Functions and Macros > USBEnableEndpoint Function