Microchip® Advanced Software Framework

uhi_cdc.h File Reference

USB host driver for Communication Device Class interface.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include "conf_usb_host.h"
#include "usb_protocol_cdc.h"
#include "uhc.h"
#include "uhi.h"

Macros

#define UHI_CDC
 Global define which contains standard UHI API for UHC It must be added in USB_HOST_UHI define from conf_usb_host.h file. More...
 

Functions

void uhi_cdc_close (uint8_t port)
 Close a port. More...
 
iram_size_t uhi_cdc_get_nb_received (uint8_t port)
 This function returns the number of character available on the CDC line. More...
 
int uhi_cdc_getc (uint8_t port)
 Waits and gets a value on CDC line. More...
 
bool uhi_cdc_is_rx_ready (uint8_t port)
 This function checks if a character has been received on the CDC line. More...
 
bool uhi_cdc_is_tx_ready (uint8_t port)
 This function checks if a new character sent is possible The type int is used to support scanf redirection from compiler LIB. More...
 
bool uhi_cdc_open (uint8_t port, usb_cdc_line_coding_t *configuration)
 Open a port of UHI CDC interface. More...
 
int uhi_cdc_putc (uint8_t port, int value)
 Puts a byte on CDC line The type int is used to support printf redirection from compiler LIB. More...
 
iram_size_t uhi_cdc_read_buf (uint8_t port, void *buf, iram_size_t size)
 Reads a RAM buffer on CDC line. More...
 
iram_size_t uhi_cdc_write_buf (uint8_t port, const void *buf, iram_size_t size)
 Writes a RAM buffer on CDC line. More...
 
Functions required by UHC

See uhi_api_t for the function descriptions

uhc_enum_status_t uhi_cdc_install (uhc_device_t *dev)
 
void uhi_cdc_enable (uhc_device_t *dev)
 
void uhi_cdc_uninstall (uhc_device_t *dev)
 
void uhi_cdc_sof (bool b_micro)