adding subclass RNDIS-CDC driver API

- implement init
- close
- xfer_isr
- open

adding waiting for notification after send rndis_initalize_msg
This commit is contained in:
hathach
2013-07-05 16:22:42 +07:00
parent e4ff63c604
commit 355fd7e648
7 changed files with 138 additions and 13 deletions

View File

@@ -54,7 +54,22 @@
extern "C" {
#endif
//--------------------------------------------------------------------+
// RNDIS-CDC Driver API
//--------------------------------------------------------------------+
#ifdef _TINY_USB_SOURCE_FILE_
typedef struct {
OSAL_SEM_DEF(semaphore_notification);
osal_semaphore_handle_t sem_notification_hdl; // used to wait on notification pipe
}rndish_data_t;
void rndish_init(void);
tusb_error_t rndish_open_subtask(uint8_t dev_addr, cdch_data_t *p_cdc) ATTR_WARN_UNUSED_RESULT;
void rndish_xfer_isr(cdch_data_t *p_cdc, pipe_handle_t pipe_hdl, tusb_event_t event, uint32_t xferred_bytes);
void rndish_close(uint8_t dev_addr);
#endif
#ifdef __cplusplus
}