This module covers basic implementation of the USB Communications Device Class (CDC) Abstract Control Model (ACM). The class has been defined in the following specification documents:
Abstract Control Model (ACM) is in fact a subclass of the Communications Device Class (CDC).
The ACM subclass describes the bidirectional communication flow popularly known as Virtual Serial Port. The class has two interfaces:
Sending of data is performed by the app_usbd_cdc_acm_write function. When all data is sent, event APP_USBD_CDC_ACM_USER_EVT_TX_DONE is generated and a new chunk of data can be sent.
Receiving of data is performed by the app_usbd_cdc_acm_read call. The library client must set up a receive buffer which is a multiple of NRF_DRV_USBD_EPSIZE. When a data package is ready, event APP_USBD_CDC_ACM_USER_EVT_RX_DONE is generated. To get the amount of received data, the library client must call app_usbd_cdc_acm_rx_size.