summaryrefslogtreecommitdiff
path: root/tinyusb/device/usbd.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-11 19:37:21 +0700
committerhathach <[email protected]>2018-03-11 19:37:21 +0700
commit08ea1c35cbc42fcf47c815a7ed1f9e35e9b74bf4 (patch)
treef127ba312e92828119057d0793902eddb9b87563 /tinyusb/device/usbd.h
parenta55fcece4cc58461da401c720ce652c8a8c810aa (diff)
create new name for multiple port API, to simplify API
Diffstat (limited to 'tinyusb/device/usbd.h')
-rw-r--r--tinyusb/device/usbd.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/tinyusb/device/usbd.h b/tinyusb/device/usbd.h
index 8258abfdf..f16a0215b 100644
--- a/tinyusb/device/usbd.h
+++ b/tinyusb/device/usbd.h
@@ -100,7 +100,13 @@ typedef struct {
//--------------------------------------------------------------------+
// APPLICATION API
//--------------------------------------------------------------------+
-bool tud_mounted(uint8_t port);
+bool tud_n_mounted(uint8_t port);
+
+static inline bool tud_mounted(void)
+{
+ return tud_n_mounted(0);
+}
+
/*------------- Callback -------------*/
/** \brief Callback function that will be invoked device is mounted (configured) by USB host