diff options
| author | hathach <[email protected]> | 2014-03-26 16:06:46 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-26 16:20:57 +0700 |
| commit | abc6b58063538340e18f5f945ce8e25ffaf11308 (patch) | |
| tree | 6514f62b5f96509c3b2bb2ab931f21815a61656b /tinyusb/class/cdc_host.c | |
| parent | 7320d22041b555f75e49d70ddcc60c297b7ab92d (diff) | |
clean up
Diffstat (limited to 'tinyusb/class/cdc_host.c')
| -rw-r--r-- | tinyusb/class/cdc_host.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/tinyusb/class/cdc_host.c b/tinyusb/class/cdc_host.c index 771c9a7ae..679b3752f 100644 --- a/tinyusb/class/cdc_host.c +++ b/tinyusb/class/cdc_host.c @@ -47,7 +47,6 @@ //--------------------------------------------------------------------+
#include "common/common.h"
#include "cdc_host.h"
-#include "cdc_rndis_host.h"
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
@@ -115,11 +114,6 @@ bool tusbh_cdc_serial_is_mounted(uint8_t dev_addr) (cdch_data[dev_addr-1].interface_protocol <= CDC_COMM_PROTOCOL_ATCOMMAND_CDMA);
}
-bool tusbh_cdc_rndis_is_mounted(uint8_t dev_addr)
-{
- return tusbh_cdc_is_mounted(dev_addr) && cdch_data[dev_addr-1].is_rndis;
-}
-
tusb_error_t tusbh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify)
{
ASSERT( tusbh_cdc_is_mounted(dev_addr), TUSB_ERROR_CDCH_DEVICE_NOT_MOUNTED);
@@ -148,9 +142,6 @@ tusb_error_t tusbh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t lengt void cdch_init(void)
{
memclr_(cdch_data, sizeof(cdch_data_t)*TUSB_CFG_HOST_DEVICE_MAX);
-#if TUSB_CFG_HOST_CDC_RNDIS
- rndish_init();
-#endif
}
tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t const *p_interface_desc, uint16_t *p_length)
@@ -224,24 +215,6 @@ tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con }
}
-#if TUSB_CFG_HOST_CDC_RNDIS // TODO move to rndis_host.c
- //------------- RNDIS -------------//
- if ( 0xff == cdch_data[dev_addr-1].interface_protocol && pipehandle_is_valid(cdch_data[dev_addr-1].pipe_notification) )
- {
- tusb_error_t error;
-
- cdch_data[dev_addr-1].is_rndis = true; // set as true at first
-
- OSAL_SUBTASK_INVOKED_AND_WAIT( rndish_open_subtask(dev_addr, &cdch_data[dev_addr-1]), error );
-
- if (TUSB_ERROR_NONE != error)
- {
- cdch_data[dev_addr-1].is_rndis = false;
- }
- }
-
- if ( !cdch_data[dev_addr-1].is_rndis ) // device is not an rndis
-#endif
{
// FIXME mounted class flag is not set yet
tusbh_cdc_mounted_cb(dev_addr);
@@ -252,14 +225,6 @@ tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con void cdch_isr(pipe_handle_t pipe_hdl, tusb_event_t event, uint32_t xferred_bytes)
{
-#if TUSB_CFG_HOST_CDC_RNDIS
- cdch_data_t *p_cdc = &cdch_data[pipe_hdl.dev_addr - 1];
- if ( p_cdc->is_rndis )
- {
- rndish_xfer_isr(p_cdc, pipe_hdl, event, xferred_bytes);
- } else
-#endif
-
tusbh_cdc_xfer_isr( pipe_hdl.dev_addr, event, get_app_pipeid(pipe_hdl), xferred_bytes );
}
@@ -267,21 +232,10 @@ void cdch_close(uint8_t dev_addr) {
cdch_data_t * p_cdc = &cdch_data[dev_addr-1];
-#if TUSB_CFG_HOST_CDC_RNDIS
- if (p_cdc->is_rndis)
- {
- rndish_close(dev_addr);
- }
-#endif
-
(void) hcd_pipe_close(p_cdc->pipe_notification);
(void) hcd_pipe_close(p_cdc->pipe_in);
(void) hcd_pipe_close(p_cdc->pipe_out);
-#if TUSB_CFG_HOST_CDC_RNDIS
-
-#endif
-
memclr_(p_cdc, sizeof(cdch_data_t));
tusbh_cdc_unmounted_cb(dev_addr);
|
