weak atrribute work around removed from CCRX_Port

This commit is contained in:
Wini-Buh
2021-06-11 22:25:36 +02:00
parent 5a554508ca
commit 1c23462b43
11 changed files with 74 additions and 349 deletions

View File

@@ -51,22 +51,10 @@ typedef struct
void (* sof ) (uint8_t rhport); /* optional */
} usbd_class_driver_t;
#if !defined(TU_HAS_NO_ATTR_WEAK)
// Invoked when initializing device stack to get additional class drivers.
// Can optionally implemented by application to extend/overwrite class driver support.
// Note: The drivers array must be accessible at all time when stack is active
usbd_class_driver_t const* usbd_app_driver_get_cb(uint8_t* driver_count) TU_ATTR_WEAK;
#else
#if ADD_WEAK_FUNC_USBD_APP_DRIVER_GET_CB
#define USBD_APP_DRIVER_GET_CB usbd_app_driver_get_cb
#endif
#ifndef USBD_APP_DRIVER_GET_CB
#define USBD_APP_DRIVER_GET_CB NULL
#else
extern usbd_class_driver_t const* USBD_APP_DRIVER_GET_CB(uint8_t* driver_count);
#endif
#endif
typedef bool (*usbd_control_xfer_cb_t)(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request);