40 #ifndef _TUSB_CDC_HOST_H_
41 #define _TUSB_CDC_HOST_H_
138 #ifdef _TINY_USB_SOURCE_FILE_
141 uint8_t interface_number;
142 uint8_t interface_protocol;
152 void cdch_init(
void);
154 void cdch_isr(
pipe_handle_t pipe_hdl, tusb_event_t event, uint32_t xferred_bytes);
155 void cdch_close(uint8_t dev_addr);
USB Standard Interface Descriptor (section 9.6.1 table 9-12)
Definition: std_descriptors.h:90
#define ATTR_WARN_UNUSED_RESULT
The warn_unused_result attribute causes a warning to be emitted if a caller of the function with this...
Definition: compiler_gcc.h:118
#define TUSB_CFG_HOST_DEVICE_MAX
Maximum number of device host stack can manage If hub class is not enabled, set this equal to numbe...
Definition: configuration.txt:35
#define ATTR_PURE
Many functions have no effects except the return value and their return value depends only on the par...
Definition: compiler_gcc.h:96
bool tusbh_cdc_serial_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT
Check if device support CDC Serial interface or not.
tusb_error_t tusbh_cdc_receive(uint8_t dev_addr, void *p_buffer, uint32_t length, bool is_notify)
Perform USB IN transfer to get data from device.
cdc_pipeid_t
CDC Pipe ID, used to indicate which pipe the API is addressing to (Notification, Out, In)
Definition: cdc.h:58
tusb_error_t tusbh_cdc_send(uint8_t dev_addr, void const *p_data, uint32_t length, bool is_notify)
Perform USB OUT transfer to device.
void tusbh_cdc_xfer_isr(uint8_t dev_addr, tusb_event_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes)
Callback function that is invoked when an transferring event occurred.
tusb_error_t
Error Code returned.
Definition: tusb_errors.h:100
void tusbh_cdc_mounted_cb(uint8_t dev_addr)
Callback function that will be invoked when a device with CDC Abstract Control Model interface is mou...
void tusbh_cdc_unmounted_cb(uint8_t dev_addr)
Callback function that will be invoked when a device with CDC Abstract Control Model interface is unm...
bool tusbh_cdc_is_busy(uint8_t dev_addr, cdc_pipeid_t pipeid) ATTR_PURE ATTR_WARN_UNUSED_RESULT
Check if the interface is currently busy or not.