mikroSDK Reference Manual
cdc_rndis_host.h
1/*
2 * The MIT License (MIT)
3 *
4 * Copyright (c) 2019 Ha Thach (tinyusb.org)
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 *
24 * This file is part of the TinyUSB stack.
25 */
26
31#ifndef _TUSB_CDC_RNDIS_HOST_H_
32#define _TUSB_CDC_RNDIS_HOST_H_
33
34#include "common/tusb_common.h"
35#include "host/usbh.h"
36#include "cdc_rndis.h"
37
38#ifdef __cplusplus
39 extern "C" {
40#endif
41
42//--------------------------------------------------------------------+
43// INTERNAL RNDIS-CDC Driver API
44//--------------------------------------------------------------------+
45typedef struct {
46 OSAL_SEM_DEF(semaphore_notification);
47 osal_semaphore_handle_t sem_notification_hdl; // used to wait on notification pipe
48 uint32_t max_xfer_size; // got from device's msg initialize complete
49 uint8_t mac_address[6];
51
52void rndish_init(void);
53bool rndish_open_subtask(uint8_t dev_addr, cdch_data_t *p_cdc);
54void rndish_xfer_isr(cdch_data_t *p_cdc, pipe_handle_t pipe_hdl, xfer_result_t event, uint32_t xferred_bytes);
55void rndish_close(uint8_t dev_addr);
56
57#ifdef __cplusplus
58 }
59#endif
60
61#endif /* _TUSB_CDC_RNDIS_HOST_H_ */
62
Definition cdc_rndis_host.h:45