partially document CDC & RNDIS
This commit is contained in:
@@ -36,16 +36,11 @@
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
/** \file
|
||||
* \brief CDC Class Driver
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup ClassDriver Class Driver
|
||||
* @{
|
||||
* \defgroup ClassDriver_CDC Communication Device Class
|
||||
* \defgroup ClassDriver_CDC Communication Device Class (CDC)
|
||||
* Currently only Abstract Control Model subclass is supported
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@@ -36,12 +36,8 @@
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
/** \ingroup TBD
|
||||
* \defgroup TBD
|
||||
* \brief TBD
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
/** \addtogroup ClassDriver_CDC Communication Device Class (CDC)
|
||||
* @{ */
|
||||
|
||||
#ifndef _TUSB_CDC_HOST_H_
|
||||
#define _TUSB_CDC_HOST_H_
|
||||
@@ -64,32 +60,54 @@ typedef enum {
|
||||
//--------------------------------------------------------------------+
|
||||
// APPLICATION PUBLIC API
|
||||
//--------------------------------------------------------------------+
|
||||
bool tusbh_cdc_serial_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT;
|
||||
/** \defgroup CDC_ACM Abtract Control Model (ACM)
|
||||
* @{ */
|
||||
|
||||
bool tusbh_cdc_serial_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT;
|
||||
tusb_error_t tusbh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify);
|
||||
tusb_error_t tusbh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify);
|
||||
|
||||
//------------- CDC Application Callback -------------//
|
||||
/** \brief Callback function that will be invoked when a device with CDC Abstract Control Model interface is mounted
|
||||
* \param[in] dev_addr Address of newly mounted device
|
||||
* \note This callback should be used by Application to set-up interface-related data
|
||||
*/
|
||||
void tusbh_cdc_mounted_cb(uint8_t dev_addr);
|
||||
|
||||
/** \brief Callback function that will be invoked when a device with CDC Abstract Control Model interface is unmounted
|
||||
* \param[in] dev_addr Address of newly unmounted device
|
||||
* \note This callback should be used by Application to tear-down interface-related data
|
||||
*/
|
||||
void tusbh_cdc_unmounted_cb(uint8_t dev_addr);
|
||||
|
||||
void tusbh_cdc_xfer_isr(uint8_t dev_addr, tusb_event_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes);
|
||||
|
||||
/// @}
|
||||
|
||||
#if TUSB_CFG_HOST_CDC_RNDIS
|
||||
//--------------------------------------------------------------------+
|
||||
// RNDIS APPLICATION API
|
||||
//--------------------------------------------------------------------+
|
||||
/** \defgroup CDC_RNDIS Remote Network Driver Interface Specification (RNDIS)
|
||||
* @{ */
|
||||
bool tusbh_cdc_rndis_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT;
|
||||
tusb_error_t tusbh_cdc_rndis_get_mac_addr(uint8_t dev_addr, uint8_t mac_address[6]);
|
||||
|
||||
//------------- RNDIS Application Callback (overshadow CDC callbacks) -------------//
|
||||
/** \brief Callback function that will be invoked when a device with RNDIS interface is mounted
|
||||
* \param[in] dev_addr Address of newly mounted device
|
||||
* \note This callback should be used by Application to set-up interface-related data
|
||||
*/
|
||||
void tusbh_cdc_rndis_mounted_cb(uint8_t dev_addr);
|
||||
|
||||
/** \brief Callback function that will be invoked when a device with RNDIS interface is unmounted
|
||||
* \param[in] dev_addr Address of newly unmounted device
|
||||
* \note This callback should be used by Application to tear-down interface-related data
|
||||
*/
|
||||
void tusbh_cdc_rndis_unmounted_cb(uint8_t dev_addr);
|
||||
|
||||
void tusbh_cdc_rndis_xfer_isr(uint8_t dev_addr, tusb_event_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
/// @}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USBH-CLASS API
|
||||
|
Reference in New Issue
Block a user