add tuh_device_ready()
This commit is contained in:
		@@ -70,6 +70,7 @@ bool tud_mounted(void);
 | 
				
			|||||||
bool tud_suspended(void);
 | 
					bool tud_suspended(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Check if device is ready to transfer
 | 
					// Check if device is ready to transfer
 | 
				
			||||||
 | 
					TU_ATTR_ALWAYS_INLINE
 | 
				
			||||||
static inline bool tud_ready(void)
 | 
					static inline bool tud_ready(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  return tud_mounted() && !tud_suspended();
 | 
					  return tud_mounted() && !tud_suspended();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -90,7 +90,17 @@ extern void hcd_int_handler(uint8_t rhport);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
tusb_speed_t tuh_device_get_speed (uint8_t dev_addr);
 | 
					tusb_speed_t tuh_device_get_speed (uint8_t dev_addr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Check if device is configured
 | 
				
			||||||
bool tuh_device_configured(uint8_t dev_addr);
 | 
					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);
 | 
					bool tuh_control_xfer (uint8_t dev_addr, tusb_control_request_t const* request, void* buffer, tuh_control_complete_cb_t complete_cb);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//--------------------------------------------------------------------+
 | 
					//--------------------------------------------------------------------+
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user