summaryrefslogtreecommitdiff
path: root/src/device/usbd_pvt.h
diff options
context:
space:
mode:
authorWini-Buh <[email protected]>2021-05-29 21:23:39 +0200
committerWini-Buh <[email protected]>2021-05-29 21:23:39 +0200
commitb4f092ec74d85d4e5567ebb45e1bd0dec20f0e02 (patch)
treef325fe267004a5368da6eb2bcd100a6026d46646 /src/device/usbd_pvt.h
parent4e2684f23aacfd9a08046c2a60da50bd1af09a27 (diff)
Adaptations for Renesas CCRX toolchain and Rx72N controller performed
Diffstat (limited to 'src/device/usbd_pvt.h')
-rw-r--r--src/device/usbd_pvt.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/device/usbd_pvt.h b/src/device/usbd_pvt.h
index 44310f022..1d60e5ae2 100644
--- a/src/device/usbd_pvt.h
+++ b/src/device/usbd_pvt.h
@@ -51,10 +51,21 @@ 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);