summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-08-24 18:35:46 +0700
committerhathach <[email protected]>2018-08-24 18:35:46 +0700
commit030c64b9cd7ea7ea0a9686f6436ed84736ff80b4 (patch)
tree40b9b349c7e62fdf22dc9b6ea448f41fd8b9921f
parent3503d70512a2d28de0fafb817a76c91a3684d3a1 (diff)
make tud_mount_cb() and tud_umount_cb() optional
-rw-r--r--src/device/usbd.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 1e59c0a7e..f9e0d8f4d 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -83,17 +83,14 @@ extern tud_desc_set_t tud_desc_set;
bool tud_mounted(void);
//--------------------------------------------------------------------+
-// APPLICATION CALLBACK
+// APPLICATION CALLBACK (WEAK is optional)
//--------------------------------------------------------------------+
-/** \brief Callback function that will be invoked device is mounted (configured) by USB host
- * \note This callback should be used by Application to \b set-up application data
- */
-void tud_mount_cb(void);
-/** \brief Callback function that will be invoked when device is unmounted (bus reset/unplugged)
- * \note This callback should be used by Application to \b tear-down application data
- */
-void tud_umount_cb(void);
+/** Callback invoked when device is mounted (configured) */
+ATTR_WEAK void tud_mount_cb(void);
+
+/** Callback invoked when device is unmounted (bus reset/unplugged) */
+ATTR_WEAK void tud_umount_cb(void);
//void tud_device_suspended_cb(void);