The Data Endpoint Configuration Functions provide an API to allocate and release hardware resources and override the memcpy function for the data endpoints.
◆ Cy_USBFS_Dev_Drv_AddEndpoint()
Configures a data endpoint for the following operation (allocates hardware resources for data endpoint).
- Parameters
-
base | The pointer to the USBFS instance. |
config | The pointer to data endpoint configuration cy_stc_usb_dev_ep_config_t. |
context | The pointer to the context structure cy_stc_usbfs_dev_drv_context_t allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure. |
- Returns
- The status code of the function execution cy_en_usbfs_dev_drv_status_t.
◆ Cy_USBFS_Dev_Drv_RemoveEndpoint()
Removes a data endpoint (release hardware resources allocated by data endpoint).
- Parameters
-
base | The pointer to the USBFS instance. |
endpointAddr | The data endpoint address (7 bit - direction, 3-0 bits - endpoint number). |
context | The pointer to the context structure cy_stc_usbfs_dev_drv_context_t allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure. |
- Returns
- Status code of the function execution cy_en_usbfs_dev_drv_status_t.
◆ Cy_USBFS_Dev_Drv_OverwriteMemcpy()
Overwrites the memory copy (memcpy) function used to copy data with the user- implemented:
- Parameters
-
base | The pointer to the USBFS instance. |
endpoint | The data endpoint number. |
memcpyFunc | The pointer to the function that copies data. |
context | The pointer to the context structure cy_stc_usbfs_dev_drv_context_t allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure. |