Interface and definitions for USB CDC ACM type interfaces in USBUS. More...

Detailed Description

Interface and definitions for USB CDC ACM type interfaces in USBUS.

The functionality provided here only implements the USB specific handling. A different module is required to provide functional handling of the data e.g. UART or STDIO integration.

Dylan Laduranty
Koen Zandberg

Definition in file acm.h.

#include <stdint.h>
#include "usb/cdc.h"
#include "usb/usbus.h"
#include "tsrb.h"
+ Include dependency graph for acm.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  usbus_cdcacm_device
 USBUS CDC ACM context struct. More...


 Buffer size for STDIN and STDOUT data to and from USB when using the USBUS_CDC_ACM_STDIO module.
 USB CDC ACM bulk endpoint size.
 USBUS CDC ACM interrupt endpoint size.


typedef struct usbus_cdcacm_device usbus_cdcacm_device_t
 USBUS CDC ACM context struct forward declaration.
typedef void(* usbus_cdcacm_cb_t) (usbus_cdcacm_device_t *cdcacm, uint8_t *data, size_t len)
 CDC ACM data callback. More...
typedef 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. More...


 CDC ACM line state as reported by the host computer. More...


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. More...
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. More...
void usbus_cdc_acm_flush (usbus_cdcacm_device_t *cdcacm)
 Flush the buffer to the USB host. More...
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. More...