add tuh_device_ready()

This commit is contained in:
hathach
2021-05-13 00:11:20 +07:00
parent b7a8b278c8
commit 791efecfdf
2 changed files with 11 additions and 0 deletions

View File

@@ -70,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();