|
uint8_t | CDC_Host_ConfigurePipes (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo, uint16_t ConfigDescriptorSize, void *ConfigDescriptorData) |
| Host interface configuration routine, to configure a given CDC host interface instance using the Configuration Descriptor read from an attached USB device. This function automatically updates the given CDC Host instance's state values and configures the pipes required to communicate with the interface if it is found within the device. This should be called once after the stack has enumerated the attached device, while the host state machine is in the Addressed state.
|
|
static uint8_t | DCOMP_CDC_Host_NextCDCControlInterface (void *const CurrentDescriptor) |
|
static uint8_t | DCOMP_CDC_Host_NextCDCDataInterface (void *const CurrentDescriptor) |
|
static uint8_t | DCOMP_CDC_Host_NextCDCInterfaceEndpoint (void *const CurrentDescriptor) |
|
void | CDC_Host_USBTask (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo) |
| General management task for a given CDC host class interface, required for the correct operation of the interface. This should be called frequently in the main program loop, before the master USB management task USB_USBTask().
|
|
uint8_t | CDC_Host_SetLineEncoding (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo) |
| Sets the line encoding for the attached device's virtual serial port. This should be called when the LineEncoding values of the interface have been changed to push the new settings to the USB device.
|
|
uint8_t | CDC_Host_SendControlLineStateChange (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo) |
| Sends a Serial Control Line State Change notification to the device. This should be called when the virtual serial control lines (DTR, RTS, etc.) have changed states. Line states persist until they are cleared via a second notification. This should be called each time the CDC class driver's ControlLineStates.HostToDevice value is updated to push the new states to the USB device.
|
|
uint8_t | CDC_Host_SendBreak (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo, const uint8_t Duration) |
| Sends a Send Break request to the device. This is generally used to separate data or to indicate a special condition to the receiving device.
|
|
uint8_t | CDC_Host_SendData (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo, const uint8_t *const Buffer, const uint16_t Length) |
| Sends a given data buffer to the attached USB device, if connected. If a device is not connected when the function is called, the data will be discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the CDC_Host_Flush() function is called to flush the pending data to the device. This allows for multiple bytes to be packed into a single pipe packet, increasing data throughput.
|
|
uint8_t | CDC_Host_SendString (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo, const char *const String) |
| Sends a given null-terminated string to the attached USB device, if connected. If a device is not connected when the function is called, the string is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the CDC_Host_Flush() function is called to flush the pending data to the device. This allows for multiple bytes to be packed into a single pipe packet, increasing data throughput.
|
|
uint8_t | CDC_Host_SendByte (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo, const uint8_t Data) |
| Sends a given byte to the attached USB device, if connected. If a device is not connected when the function is called, the byte is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the CDC_Host_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be packed into a single pipe packet, increasing data throughput.
|
|
uint16_t | CDC_Host_BytesReceived (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo) |
| Determines the number of bytes received by the CDC interface from the device, waiting to be read. This indicates the number of bytes in the IN pipe bank only, and thus the number of calls to CDC_Host_ReceiveByte() which are guaranteed to succeed immediately. If multiple bytes are to be received, they should be buffered by the user application, as the pipe bank will not be released back to the USB controller until all bytes are read.
|
|
int16_t | CDC_Host_ReceiveByte (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo) |
| Reads a byte of data from the device. If no data is waiting to be read of if a USB device is not connected, the function returns a negative value. The CDC_Host_BytesReceived() function may be queried in advance to determine how many bytes are currently buffered in the CDC interface's data receive pipe.
|
|
uint8_t | CDC_Host_Flush (USB_ClassInfo_CDC_Host_t *const CDCInterfaceInfo) |
| Flushes any data waiting to be sent, ensuring that the send buffer is cleared.
|
|
void | CDC_Host_Event_Stub (void) |
|