VSF Documented
vsf_usb_CDCNCM.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_USB_CDCNCM_H__
19#define __VSF_USB_CDCNCM_H__
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/*============================ INCLUDES ======================================*/
26/*============================ MACROS ========================================*/
27
28#define USB_CDCNCM_CAP_SetEthernetPacketFilter (1 << 0)
29#define USB_CDCNCM_CAP_NetAddress (1 << 1)
30#define USB_CDCNCM_CAP_EncapsulatedCmdResp (1 << 2)
31#define USB_CDCNCM_CAP_MaxDatagramSize (1 << 3)
32#define USB_CDCNCM_CAP_CrcMode (1 << 4)
33#define USB_CDCNCM_CAP_NtbInputSize8 (1 << 5)
34
35#define USB_CDCNCM_NTH16_SIG 0x484D434E
36#define USB_CDCNCM_NTH32_SIG 0x686D636E
37#define USB_CDCNCM_NDP16_SIG_NOCRC 0x304D434E
38#define USB_CDCNCM_NDP16_SIG_CRC 0x314D434E
39#define USB_CDCNCM_NDP32_SIG_NOCRC 0x306D636E
40#define USB_CDCNCM_NDP32_SIG_CRC 0x316D636E
41
42/*============================ MACROFIED FUNCTIONS ===========================*/
43/*============================ TYPES =========================================*/
44
60
67
68#define USB_CDCNCM_NTB_PARAM_NTB16 (1 << 0)
69#define USB_CDCNCM_NTB_PARAM_NTB32 (1 << 1)
70
71typedef enum usb_cdcncm_req_t {
89
92 struct {
99 struct {
106 struct {
112
115 struct {
119 struct {
124 struct {
130 struct {
135 struct {
140
141/*============================ GLOBAL VARIABLES ==============================*/
142/*============================ PROTOTYPES ====================================*/
143
144#ifdef __cplusplus
145}
146#endif
147
148#endif // __VSF_USB_CDCNCM_H__
unsigned short uint16_t
Definition lvgl.h:41
unsigned int uint32_t
Definition lvgl.h:43
Definition vsf_usb_CDCNCM.h:62
uint16_t reserved
Definition vsf_usb_CDCNCM.h:65
uint32_t dwNtbInMaxSize
Definition vsf_usb_CDCNCM.h:63
uint16_t wNtbInMaxDataframes
Definition vsf_usb_CDCNCM.h:64
Definition vsf_usb_CDCNCM.h:46
uint32_t dwNtbInMaxSize
Definition vsf_usb_CDCNCM.h:49
uint16_t wNdpOutPayloadRemainder
Definition vsf_usb_CDCNCM.h:56
uint16_t wNdpOutDivisor
Definition vsf_usb_CDCNCM.h:55
uint16_t wNtbOutMaxDatagrams
Definition vsf_usb_CDCNCM.h:58
uint16_t bmNtbFormatsSupported
Definition vsf_usb_CDCNCM.h:48
uint16_t wNdpInPayloadRemainder
Definition vsf_usb_CDCNCM.h:51
uint16_t wNdpOutAlignment
Definition vsf_usb_CDCNCM.h:57
uint16_t wReservedZero
Definition vsf_usb_CDCNCM.h:53
uint32_t dwNtbOutMaxSize
Definition vsf_usb_CDCNCM.h:54
uint16_t wNdpInDivisor
Definition vsf_usb_CDCNCM.h:50
uint16_t wLength
Definition vsf_usb_CDCNCM.h:47
uint16_t wNdpInAlignment
Definition vsf_usb_CDCNCM.h:52
Definition vsf_usb_CDCNCM.h:114
uint16_t dwNextNdpIndex
Definition vsf_usb_CDCNCM.h:118
uint16_t wDatagramIndex
Definition vsf_usb_CDCNCM.h:120
struct usb_cdcncm_ndp_t::@165::@168 indexes[0]
struct usb_cdcncm_ndp_t::@167 VSF_CAL_PACKED
struct usb_cdcncm_ndp_t::@165 ndp16
uint32_t dwDatagramIndex
Definition vsf_usb_CDCNCM.h:131
uint32_t dwNextNdpIndex
Definition vsf_usb_CDCNCM.h:128
uint32_t dwReserved12
Definition vsf_usb_CDCNCM.h:129
uint16_t wDatagramLength
Definition vsf_usb_CDCNCM.h:121
uint16_t wReserved6
Definition vsf_usb_CDCNCM.h:127
uint16_t wLength
Definition vsf_usb_CDCNCM.h:117
struct usb_cdcncm_ndp_t::@166 ndp32
uint32_t dwDatagramLength
Definition vsf_usb_CDCNCM.h:132
uint32_t dwSignature
Definition vsf_usb_CDCNCM.h:116
Definition vsf_usb_CDCNCM.h:91
struct usb_cdcncm_nth_t::@163 VSF_CAL_PACKED
struct usb_cdcncm_nth_t::@162 nth32
uint16_t wNdpIndex
Definition vsf_usb_CDCNCM.h:97
struct usb_cdcncm_nth_t::@161 nth16
uint16_t wSequence
Definition vsf_usb_CDCNCM.h:95
uint16_t wBlockLength
Definition vsf_usb_CDCNCM.h:96
uint32_t dwBlockLength
Definition vsf_usb_CDCNCM.h:103
uint32_t dwNdpIndex
Definition vsf_usb_CDCNCM.h:104
uint32_t dwSignature
Definition vsf_usb_CDCNCM.h:93
uint16_t wHeaderLength
Definition vsf_usb_CDCNCM.h:94
struct usb_cdcncm_ntb_param_t VSF_CAL_PACKED
usb_cdcncm_req_t
Definition vsf_usb_CDCNCM.h:71
@ USB_CDCNCM_REQ_GET_ETHERNET_STATIC
Definition vsf_usb_CDCNCM.h:76
@ USB_CDCNCM_REQ_SET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER
Definition vsf_usb_CDCNCM.h:73
@ USB_CDCNCM_REQ_SET_ETHERNET_MULTICAST_FILTERS
Definition vsf_usb_CDCNCM.h:72
@ USB_CDCNCM_REQ_GET_NTB_FORMAT
Definition vsf_usb_CDCNCM.h:80
@ USB_CDCNCM_REQ_SET_NTB_FORMAT
Definition vsf_usb_CDCNCM.h:81
@ USB_CDCNCM_REQ_GET_NTB_PARAMETERS
Definition vsf_usb_CDCNCM.h:77
@ USB_CDCNCM_REQ_SET_NTB_INPUT_SIZE
Definition vsf_usb_CDCNCM.h:83
@ USB_CDCNCM_REQ_GET_NTB_INPUT_SIZE
Definition vsf_usb_CDCNCM.h:82
@ USB_CDCNCM_REQ_SET_MAX_DATAGRAM_SIZE
Definition vsf_usb_CDCNCM.h:85
@ USB_CDCNCM_REQ_GET_NET_ADDRESS
Definition vsf_usb_CDCNCM.h:78
@ USB_CDCNCM_REQ_GET_CRC_MODE
Definition vsf_usb_CDCNCM.h:86
@ USB_CDCNCM_REQ_SET_ETHERNET_PACKET_FILTER
Definition vsf_usb_CDCNCM.h:75
@ USB_CDCNCM_REQ_SET_CRC_MODE
Definition vsf_usb_CDCNCM.h:87
@ USB_CDCNCM_REQ_GET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER
Definition vsf_usb_CDCNCM.h:74
@ USB_CDCNCM_REQ_SET_NET_ADDRESS
Definition vsf_usb_CDCNCM.h:79
@ USB_CDCNCM_REQ_GET_MAX_DATAGRAM_SIZE
Definition vsf_usb_CDCNCM.h:84