From 791efecfdfd650e7287388e3f3210b18f7262934 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 13 May 2021 00:11:20 +0700 Subject: add tuh_device_ready() --- src/host/usbh.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/host') diff --git a/src/host/usbh.h b/src/host/usbh.h index e503ef8fb..590c8a359 100644 --- a/src/host/usbh.h +++ b/src/host/usbh.h @@ -90,7 +90,17 @@ extern void hcd_int_handler(uint8_t rhport); tusb_speed_t tuh_device_get_speed (uint8_t dev_addr); +// Check if device is configured bool tuh_device_configured(uint8_t dev_addr); + +// Check if device is ready to communicate with +TU_ATTR_ALWAYS_INLINE +static inline bool tuh_device_ready(uint8_t dev_addr) +{ + return tuh_device_configured(dev_addr); +} + +// Carry out control transfer bool tuh_control_xfer (uint8_t dev_addr, tusb_control_request_t const* request, void* buffer, tuh_control_complete_cb_t complete_cb); //--------------------------------------------------------------------+ -- cgit v1.3.1