61 #ifdef CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE_EXP 
   62 #define CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE (1<<CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE_EXP) 
   64 #ifndef CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE 
   65 #define CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE (128) 
   71 #if IS_ACTIVE(CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE_8) 
   72 #define CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE     (8) 
   73 #elif IS_ACTIVE(CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE_16) 
   74 #define CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE    (16) 
   75 #elif IS_ACTIVE(CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE_32) 
   76 #define CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE    (32) 
   77 #elif IS_ACTIVE(CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE_64) 
   78 #define CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE    (64) 
   81 #ifndef CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE 
   82 #define CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE    (64) 
   89 #define USBUS_CDC_ACM_INT_EP_SIZE      (8) 
   94 #define USBUS_CDC_ACM_EP_IN_REQUIRED_NUMOF   2 
   99 #define USBUS_CDC_ACM_EP_OUT_REQUIRED_NUMOF  1 
  131                                   uint8_t *data, 
size_t len);
 
  148                                         uint32_t baud, uint8_t bits,
 
  149                                         uint8_t parity, uint8_t stop);
 
  192                         uint8_t *buf, 
size_t len);
 
  204                            const uint8_t *buf, 
size_t len);
 
Definition for USB CDC interfaces.
 
#define usbdev_ep_buf_t
Instantiation type for usbdev endpoint buffers.
 
#define CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE
USB CDC ACM bulk endpoint size.
 
#define CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE
Buffer size for STDIN and STDOUT data to and from USB when using the USBUS_CDC_ACM_STDIO module.
 
usbus_cdcacm_line_state_t
CDC ACM line state as reported by the host computer.
 
void(* usbus_cdcacm_cb_t)(usbus_cdcacm_device_t *cdcacm, uint8_t *data, size_t len)
CDC ACM data callback.
 
void usbus_cdc_acm_init(usbus_t *usbus, usbus_cdcacm_device_t *cdcacm, usbus_cdcacm_cb_t cb, usbus_cdcacm_coding_cb_t coding_cb, uint8_t *buf, size_t len)
Initialize an USBUS CDC ACM interface.
 
void usbus_cdc_acm_set_coding_cb(usbus_cdcacm_device_t *cdcacm, usbus_cdcacm_coding_cb_t coding_cb)
Set the callback for control settings.
 
size_t usbus_cdc_acm_submit(usbus_cdcacm_device_t *cdcacm, const uint8_t *buf, size_t len)
Submit bytes to the CDC ACM handler.
 
void usbus_cdc_acm_flush(usbus_cdcacm_device_t *cdcacm)
Flush the buffer to the USB host.
 
int(* usbus_cdcacm_coding_cb_t)(usbus_cdcacm_device_t *cdcacm, uint32_t baud, uint8_t bits, uint8_t parity, uint8_t stop)
CDC ACM line coding callback.
 
@ USBUS_CDC_ACM_LINE_STATE_DISCONNECTED
No DTE connected.
 
@ USBUS_CDC_ACM_LINE_STATE_DTE
DTE (e.g.
 
thread-safe ringbuffer struct
 
USB CDC ACM line coding setup content.
 
USBUS CDC ACM context struct.
 
usbus_cdcacm_coding_cb_t coding_cb
Callback for ACM coding changes.
 
tsrb_t tsrb
TSRB for data to the host
 
usbus_t * usbus
USBUS reference
 
event_t flush
device2host forced flush event
 
usbus_cdcacm_line_state_t state
Current line state
 
usbus_handler_t handler_ctrl
control handler
 
usb_req_cdcacm_coding_t coding
Current coding configuration
 
usbus_interface_t iface_ctrl
CDC control interface
 
size_t occupied
Number of bytes for the host
 
usbus_interface_t iface_data
CDC data interface
 
usbdev_ep_buf_t out_buf[CONFIG_USBUS_CDC_ACM_BULK_EP_SIZE]
Host to device data buffer.
 
usbus_cdcacm_cb_t cb
Callback for data handlers
 
usbus_descr_gen_t cdcacm_descr
CDC descriptor generator
 
usbdev_ep_buf_t in_buf[CONFIG_USBUS_CDC_ACM_STDIO_BUF_SIZE]
Device to host data buffer.
 
USBUS descriptor generator.
 
Thread-safe ringbuffer interface definition.