USBUS CDC ACM interface module.  
More...
USBUS CDC ACM interface module. 
 | 
| file   | acm.h | 
|   | Interface and definitions for USB CDC ACM type interfaces in USBUS. 
  | 
|   | 
◆ usbus_cdcacm_cb_t
CDC ACM data callback. 
Callback for received data from the USB host
- Parameters
 - 
  
    | [in] | cdcacm | CDC ACM handler context  | 
    | [in] | data | ptr to the data  | 
    | [in] | len | Length of the received data  | 
  
   
Definition at line 130 of file acm.h.
 
 
◆ usbus_cdcacm_coding_cb_t
      
        
          | 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. 
Callback for received line coding request from the USB host
- Parameters
 - 
  
    | [in] | cdcacm | CDC ACM handler context  | 
    | [in] | baud | requested baud rate  | 
    | [in] | bits | requested number of data bits  | 
    | [in] | parity | requested parity  | 
    | [in] | stop | requested number of stop bits | 
  
   
- Returns
 - 0 when the mode is available 
 
- 
negative if the mode is not available 
 
Definition at line 147 of file acm.h.
 
 
◆ usbus_cdcacm_line_state_t
CDC ACM line state as reported by the host computer. 
| Enumerator | 
|---|
| USBUS_CDC_ACM_LINE_STATE_DISCONNECTED  | No DTE connected.  
 | 
| USBUS_CDC_ACM_LINE_STATE_DTE  | DTE (e.g.  
a personal computer) is present and connected  
 | 
Definition at line 104 of file acm.h.
 
 
◆ usbus_cdc_acm_flush()
Flush the buffer to the USB host. 
- Parameters
 - 
  
    | [in] | cdcacm | USBUS CDC ACM handler context  | 
  
   
 
 
◆ usbus_cdc_acm_init()
Initialize an USBUS CDC ACM interface. 
- Parameters
 - 
  
    | [in] | usbus | USBUS context to register with  | 
    | [in] | cdcacm | USBUS CDC ACM handler  | 
    | [in] | cb | Callback for data from the USB interface  | 
    | [in] | coding_cb | Callback for control settings  | 
    | [in] | buf | Buffer for data to the USB interface  | 
    | [in] | len | Size in bytes of the buffer  | 
  
   
 
 
◆ usbus_cdc_acm_set_coding_cb()
Set the callback for control settings. 
Interrupts are disabled during update to ensure thread safety
- Parameters
 - 
  
    | [in] | cdcacm | USBUS CDC ACM handler context  | 
    | [in] | coding_cb | Callback for control settings  | 
  
   
 
 
◆ usbus_cdc_acm_submit()
Submit bytes to the CDC ACM handler. 
- Parameters
 - 
  
    | [in] | cdcacm | USBUS CDC ACM handler context  | 
    | [in] | buf | buffer to submit  | 
    | [in] | len | length of the submitted buffer | 
  
   
- Returns
 - Number of bytes added to the CDC ACM ring buffer