CDC ACM Class Modem Example
This example will, upon connection of a CDC ACM device, issue a set of AT commands and display the results on the console. Note that in order to correctly execute this example, you will need a CDC ACM USB device that supports the AT commands.
The example accomplishes the following tasks:
- Initialize the CDC base class
- Initialize the ACM subclass
- Call the CDC base class Post Init function to inform the base class that all the subclasses have been initialized
- Allocate a buffer that is used to issue the AT commands and that holds the returned data
- Create a kernel task that will handle the AT commands issuing and that is triggered when a CDC ACM device is connected
The kernel task accomplishes the following tasks:
- Wait for the connection of a CDC ACM device
- Set a proper line coding
- Set the control line state
- Issue the following AT commands, and read and display the result:
The example will also display the serial state changes on the console.
The example implementation is located in
This example offers only one API named
Ex_USBH_CDC_ACM_Init(). This function is normally called from a USB host core example.