summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-03-30 15:03:35 +0700
committerhathach <[email protected]>2019-03-30 15:03:48 +0700
commitee6ed084f48933ec884ceb5cdce2b265df37d78a (patch)
tree150dd05851e81c0b67cbc82647d2f002c6f2b1de
parentb28cc6ddb11ef233b6e6ee25b4a305b4b76cc03c (diff)
clean up text
-rw-r--r--examples/device/cdc_msc_hid/src/main.c4
-rw-r--r--src/device/usbd.h8
2 files changed, 7 insertions, 5 deletions
diff --git a/examples/device/cdc_msc_hid/src/main.c b/examples/device/cdc_msc_hid/src/main.c
index 1fa0fead1..a8ef0575c 100644
--- a/examples/device/cdc_msc_hid/src/main.c
+++ b/examples/device/cdc_msc_hid/src/main.c
@@ -210,13 +210,15 @@ void tud_umount_cb(void)
blink_interval_ms = 250;
}
-// Invoked when device is suspended
+// Invoked when usb bus is suspended
+// USB specs: device can only draw up to 2.5 mA from bus
void tud_suspend_cb(bool remote_wakeup_en)
{
(void) remote_wakeup_en;
blink_interval_ms = 2500;
}
+// Invoked when usb bus is resumed
void tud_resume_cb(void)
{
blink_interval_ms = 1000;
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 27bfe305b..2365d645e 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -76,16 +76,16 @@ bool tud_remote_wakeup(void);
// Application Callbacks (WEAK is optional)
//--------------------------------------------------------------------+
-// Callback invoked when device is mounted (configured)
+// Invoked when device is mounted (configured)
ATTR_WEAK void tud_mount_cb(void);
-// Callback invoked when device is unmounted
+// Invoked when device is unmounted
ATTR_WEAK void tud_umount_cb(void);
-// Callback invoked when device is suspended
+// Invoked when usb bus is suspended, max bus current draw is 2.5 mA
ATTR_WEAK void tud_suspend_cb(bool remote_wakeup_en);
-// Callback invoked when device is resumed
+// Invoked when usb bus is resumed
ATTR_WEAK void tud_resume_cb(void);
#ifdef __cplusplus