summaryrefslogtreecommitdiff
path: root/src/device/usbd.h
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-05-22 22:56:17 +0700
committerGitHub <[email protected]>2021-05-22 22:56:17 +0700
commit56577d9fcab58680b22d86be6ecac0a16f96f659 (patch)
tree445278bc5e2aba1e9fbdc8cd064c5e4f09ee8ac2 /src/device/usbd.h
parentcdb063f007f16f5cfad7b4c05fc117da5f251b26 (diff)
parentf13a3c04f790a865472a7ed0b57182f401189977 (diff)
Merge pull request #834 from hathach/host-hid
Rework Host hid
Diffstat (limited to 'src/device/usbd.h')
-rw-r--r--src/device/usbd.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 7c50a6db0..c707cecfc 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -41,7 +41,10 @@ extern "C" {
//--------------------------------------------------------------------+
// Init device stack
-bool tud_init (void);
+bool tud_init (uint8_t rhport);
+
+// Check if device stack is already initialized
+bool tud_inited(void);
// Task function should be called in main/rtos loop
void tud_task (void);
@@ -67,6 +70,7 @@ bool tud_mounted(void);
bool tud_suspended(void);
// Check if device is ready to transfer
+TU_ATTR_ALWAYS_INLINE
static inline bool tud_ready(void)
{
return tud_mounted() && !tud_suspended();