nic.h
Go to the documentation of this file.
1 /**
2  * @file nic.h
3  * @brief Network interface controller abstraction layer
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneTCP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.4.0
29  **/
30 
31 #ifndef _NIC_H
32 #define _NIC_H
33 
34 //Dependencies
35 #include "core/net.h"
36 
37 //Tick interval to handle NIC periodic operations
38 #ifndef NIC_TICK_INTERVAL
39  #define NIC_TICK_INTERVAL 1000
40 #elif (NIC_TICK_INTERVAL < 10)
41  #error NIC_TICK_INTERVAL parameter is not valid
42 #endif
43 
44 //Maximum duration a write operation may block
45 #ifndef NIC_MAX_BLOCKING_TIME
46  #define NIC_MAX_BLOCKING_TIME INFINITE_DELAY
47 #elif (NIC_MAX_BLOCKING_TIME < 0)
48  #error NIC_MAX_BLOCKING_TIME parameter is not valid
49 #endif
50 
51 //Size of the NIC driver context
52 #ifndef NIC_CONTEXT_SIZE
53  #define NIC_CONTEXT_SIZE 16
54 #elif (NIC_CONTEXT_SIZE < 1)
55  #error NIC_CONTEXT_SIZE parameter is not valid
56 #endif
57 
58 //Switch CPU port
59 #define SWITCH_CPU_PORT 32
60 #define SWITCH_CPU_PORT_MASK 0x80000000
61 
62 //Serial Management Interface
63 #define SMI_SYNC 0xFFFFFFFF
64 #define SMI_START 1
65 #define SMI_OPCODE_0 0
66 #define SMI_OPCODE_WRITE 1
67 #define SMI_OPCODE_READ 2
68 #define SMI_TA 2
69 
70 //C++ guard
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
75 
76 /**
77  * @brief NIC types
78  **/
79 
80 typedef enum
81 {
82  NIC_TYPE_UNKNOWN = 0, ///<Unknown interface type
83  NIC_TYPE_ETHERNET = 1, ///<Ethernet interface
84  NIC_TYPE_PPP = 2, ///<PPP interface
85  NIC_TYPE_IPV4 = 3, ///<IPv4 interface
86  NIC_TYPE_IPV6 = 4, ///<IPv6 interface
87  NIC_TYPE_6LOWPAN = 4, ///<6LoWPAN interface
88  NIC_TYPE_LOOPBACK = 5 ///<Loopback interface
90 
91 
92 /**
93  * @brief Link state
94  **/
95 
96 typedef enum
97 {
102 
103 
104 /**
105  * @brief Link speed
106  **/
107 
108 typedef enum
109 {
113  NIC_LINK_SPEED_1GBPS = 1000000000
115 
116 
117 /**
118  * @brief Duplex mode
119  **/
120 
121 typedef enum
122 {
127 
128 
129 /**
130  * @brief Switch port state
131  **/
132 
133 typedef enum
134 {
142 
143 
144 /**
145  * @brief Forwarding database entry
146  **/
147 
148 typedef struct
149 {
151  uint8_t srcPort;
152  uint32_t destPorts;
153  bool_t override;
155 
156 
157 /**
158  * @brief VLAN entry
159  **/
160 
161 typedef struct
162 {
163  uint16_t vlanId;
165  uint16_t fid;
166  uint32_t ports;
168 
169 
170 //NIC driver abstraction layer
171 typedef error_t (*NicInit)(NetInterface *interface);
172 typedef void (*NicTick)(NetInterface *interface);
173 typedef void (*NicEnableIrq)(NetInterface *interface);
174 typedef void (*NicDisableIrq)(NetInterface *interface);
175 typedef void (*NicEventHandler)(NetInterface *interface);
176 
177 typedef error_t (*NicSendPacket)(NetInterface *interface,
178  const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary);
179 
181 typedef error_t (*NicUpdateMacConfig)(NetInterface *interface);
182 
183 typedef void (*NicWritePhyReg)(uint8_t opcode, uint8_t phyAddr,
184  uint8_t regAddr, uint16_t data);
185 
186 typedef uint16_t (*NicReadPhyReg)(uint8_t opcode, uint8_t phyAddr,
187  uint8_t regAddr);
188 
189 //Ethernet PHY driver abstraction layer
190 typedef error_t (*PhyInit)(NetInterface *interface);
191 typedef void (*PhyTick)(NetInterface *interface);
192 typedef void (*PhyEnableIrq)(NetInterface *interface);
193 typedef void (*PhyDisableIrq)(NetInterface *interface);
194 typedef void (*PhyEventHandler)(NetInterface *interface);
195 
196 //Ethernet switch driver abstraction layer
197 typedef error_t (*SwitchInit)(NetInterface *interface);
198 typedef void (*SwitchTick)(NetInterface *interface);
199 typedef void (*SwitchEnableIrq)(NetInterface *interface);
200 typedef void (*SwitchDisableIrq)(NetInterface *interface);
201 typedef void (*SwitchEventHandler)(NetInterface *interface);
202 
203 typedef error_t (*SwitchTagFrame)(NetInterface *interface, NetBuffer *buffer,
204  size_t *offset, NetTxAncillary *ancillary);
205 
206 typedef error_t (*SwitchUntagFrame)(NetInterface *interface, uint8_t **frame,
207  size_t *length, NetRxAncillary *ancillary);
208 
209 typedef bool_t (*SwitchGetLinkState)(NetInterface *interface, uint8_t port);
210 typedef uint32_t (*SwitchGetLinkSpeed)(NetInterface *interface, uint8_t port);
211 
213  uint8_t port);
214 
215 typedef void (*SwitchSetPortState)(NetInterface *interface, uint8_t port,
216  SwitchPortState state);
217 
219  uint8_t port);
220 
221 typedef void (*SwitchSetAgingTime)(NetInterface *interface, uint32_t agingTime);
222 
223 typedef void (*SwitchEnableIgmpSnooping)(NetInterface *interface,
224  bool_t enable);
225 
226 typedef void (*SwitchEnableMldSnooping)(NetInterface *interface,
227  bool_t enable);
228 
229 typedef void (*SwitchEnableRsvdMcastTable)(NetInterface *interface,
230  bool_t enable);
231 
232 typedef error_t (*SwitchAddFdbEntry)(NetInterface *interface,
233  const SwitchFdbEntry *entry);
234 
236  const SwitchFdbEntry *entry);
237 
238 typedef error_t (*SwitchGetFdbEntry)(NetInterface *interface, uint_t index,
239  SwitchFdbEntry *entry);
240 
241 typedef void (*SwitchFlushStaticFdbTable)(NetInterface *interface);
242 
243 typedef void (*SwitchFlushDynamicFdbTable)(NetInterface *interface,
244  uint8_t port);
245 
246 typedef void (*SwitchSetUnknownMcastFwdPorts)(NetInterface *interface,
247  bool_t enable, uint32_t forwardPorts);
248 
249 //SMI driver abstraction layer
250 typedef error_t (*SmiInit)(void);
251 
252 typedef void (*SmiWritePhyReg)(uint8_t opcode, uint8_t phyAddr,
253  uint8_t regAddr, uint16_t data);
254 
255 typedef uint16_t (*SmiReadPhyReg)(uint8_t opcode, uint8_t phyAddr,
256  uint8_t regAddr);
257 
258 //SPI driver abstraction layer
259 typedef error_t (*SpiInit)(void);
260 typedef error_t (*SpiSetMode)(uint_t mode);
261 typedef error_t (*SpiSetBitrate)(uint_t bitrate);
262 typedef void (*SpiAssertCs)(void);
263 typedef void (*SpiDeassertCs)(void);
264 typedef uint8_t (*SpiTransfer)(uint8_t data);
265 
266 //UART driver abstraction layer
267 typedef error_t (*UartInit)(void);
268 typedef void (*UartEnableIrq)(void);
269 typedef void (*UartDisableIrq)(void);
270 typedef void (*UartStartTx)(void);
271 
272 //External interrupt line driver abstraction layer
273 typedef error_t (*ExtIntInit)(void);
274 typedef void (*ExtIntEnableIrq)(void);
275 typedef void (*ExtIntDisableIrq)(void);
276 
277 
278 /**
279  * @brief NIC driver
280  **/
281 
282 typedef struct
283 {
285  size_t mtu;
300 } NicDriver;
301 
302 
303 /**
304  * @brief Ethernet PHY driver
305  **/
306 
307 typedef struct
308 {
314 } PhyDriver;
315 
316 
317 /**
318  * @brief Ethernet switch driver
319  **/
320 
321 typedef struct
322 {
346 } SwitchDriver;
347 
348 
349 /**
350  * @brief SMI driver
351  **/
352 
353 typedef struct
354 {
358 } SmiDriver;
359 
360 
361 /**
362  * @brief SPI driver
363  **/
364 
365 typedef struct
366 {
373 } SpiDriver;
374 
375 
376 /**
377  * @brief UART driver
378  **/
379 
380 typedef struct
381 {
386 } UartDriver;
387 
388 
389 /**
390  * @brief External interrupt line driver
391  **/
392 
393 typedef struct
394 {
398 } ExtIntDriver;
399 
400 
401 //Tick counter to handle periodic operations
403 
404 //NIC abstraction layer
407 uint8_t nicGetSwitchPort(NetInterface *interface);
408 uint16_t nicGetVlanId(NetInterface *interface);
409 uint16_t nicGetVmanId(NetInterface *interface);
410 
412 
413 void nicTick(NetInterface *interface);
414 
415 error_t nicSendPacket(NetInterface *interface, const NetBuffer *buffer,
416  size_t offset, NetTxAncillary *ancillary);
417 
419 
420 void nicProcessPacket(NetInterface *interface, uint8_t *packet, size_t length,
421  NetRxAncillary *ancillary);
422 
423 void nicNotifyLinkChange(NetInterface *interface);
424 
425 //C++ guard
426 #ifdef __cplusplus
427 }
428 #endif
429 
430 #endif
unsigned int uint_t
Definition: compiler_port.h:50
int bool_t
Definition: compiler_port.h:53
uint8_t opcode
Definition: dns_common.h:188
uint16_t port
Definition: dns_common.h:267
error_t
Error codes.
Definition: error.h:43
uint8_t data[]
Definition: ethernet.h:222
MacAddr
Definition: ethernet.h:195
uint16_t regAddr
TCP/IP stack core.
#define NetInterface
Definition: net.h:36
#define NetRxAncillary
Definition: net_misc.h:40
#define NetTxAncillary
Definition: net_misc.h:36
void(* ExtIntDisableIrq)(void)
Definition: nic.h:275
void(* UartStartTx)(void)
Definition: nic.h:270
uint16_t(* NicReadPhyReg)(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr)
Definition: nic.h:186
error_t(* ExtIntInit)(void)
Definition: nic.h:273
NicLinkState
Link state.
Definition: nic.h:97
@ NIC_LINK_STATE_UP
Definition: nic.h:99
@ NIC_LINK_STATE_AUTO
Definition: nic.h:100
@ NIC_LINK_STATE_DOWN
Definition: nic.h:98
void(* PhyDisableIrq)(NetInterface *interface)
Definition: nic.h:193
void(* SwitchEnableIgmpSnooping)(NetInterface *interface, bool_t enable)
Definition: nic.h:223
error_t(* SwitchAddFdbEntry)(NetInterface *interface, const SwitchFdbEntry *entry)
Definition: nic.h:232
systime_t nicTickCounter
Definition: nic.c:43
error_t(* NicUpdateMacAddrFilter)(NetInterface *interface)
Definition: nic.h:180
error_t nicSendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet to the network controller.
Definition: nic.c:280
error_t(* NicUpdateMacConfig)(NetInterface *interface)
Definition: nic.h:181
uint16_t nicGetVmanId(NetInterface *interface)
Retrieve VMAN identifier.
Definition: nic.c:175
void(* NicDisableIrq)(NetInterface *interface)
Definition: nic.h:174
void(* SpiDeassertCs)(void)
Definition: nic.h:263
void(* SwitchDisableIrq)(NetInterface *interface)
Definition: nic.h:200
void(* PhyEventHandler)(NetInterface *interface)
Definition: nic.h:194
void(* SwitchFlushStaticFdbTable)(NetInterface *interface)
Definition: nic.h:241
NicDuplexMode(* SwitchGetDuplexMode)(NetInterface *interface, uint8_t port)
Definition: nic.h:212
void(* NicTick)(NetInterface *interface)
Definition: nic.h:172
void(* PhyEnableIrq)(NetInterface *interface)
Definition: nic.h:192
void(* NicEnableIrq)(NetInterface *interface)
Definition: nic.h:173
void(* SpiAssertCs)(void)
Definition: nic.h:262
error_t(* SpiInit)(void)
Definition: nic.h:259
uint8_t nicGetSwitchPort(NetInterface *interface)
Retrieve switch port identifier.
Definition: nic.c:113
void(* NicWritePhyReg)(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr, uint16_t data)
Definition: nic.h:183
void nicProcessPacket(NetInterface *interface, uint8_t *packet, size_t length, NetRxAncillary *ancillary)
Handle a packet received by the network controller.
Definition: nic.c:391
void(* NicEventHandler)(NetInterface *interface)
Definition: nic.h:175
NetInterface * nicGetLogicalInterface(NetInterface *interface)
Retrieve logical interface.
Definition: nic.c:52
uint16_t nicGetVlanId(NetInterface *interface)
Retrieve VLAN identifier.
Definition: nic.c:144
void(* ExtIntEnableIrq)(void)
Definition: nic.h:274
uint32_t(* SwitchGetLinkSpeed)(NetInterface *interface, uint8_t port)
Definition: nic.h:210
void(* SmiWritePhyReg)(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr, uint16_t data)
Definition: nic.h:252
void(* SwitchSetPortState)(NetInterface *interface, uint8_t port, SwitchPortState state)
Definition: nic.h:215
void(* SwitchTick)(NetInterface *interface)
Definition: nic.h:198
error_t(* NicInit)(NetInterface *interface)
Definition: nic.h:171
void(* SwitchSetAgingTime)(NetInterface *interface, uint32_t agingTime)
Definition: nic.h:221
error_t(* NicSendPacket)(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Definition: nic.h:177
void(* SwitchSetUnknownMcastFwdPorts)(NetInterface *interface, bool_t enable, uint32_t forwardPorts)
Definition: nic.h:246
uint16_t(* SmiReadPhyReg)(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr)
Definition: nic.h:255
uint8_t(* SpiTransfer)(uint8_t data)
Definition: nic.h:264
error_t nicUpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
Definition: nic.c:352
bool_t(* SwitchGetLinkState)(NetInterface *interface, uint8_t port)
Definition: nic.h:209
error_t(* SwitchInit)(NetInterface *interface)
Definition: nic.h:197
void(* SwitchFlushDynamicFdbTable)(NetInterface *interface, uint8_t port)
Definition: nic.h:243
void nicTick(NetInterface *interface)
Network controller timer handler.
Definition: nic.c:250
error_t(* SmiInit)(void)
Definition: nic.h:250
NetInterface * nicGetPhysicalInterface(NetInterface *interface)
Retrieve physical interface.
Definition: nic.c:84
error_t(* SpiSetBitrate)(uint_t bitrate)
Definition: nic.h:261
void(* PhyTick)(NetInterface *interface)
Definition: nic.h:191
SwitchPortState(* SwitchGetPortState)(NetInterface *interface, uint8_t port)
Definition: nic.h:218
void(* UartDisableIrq)(void)
Definition: nic.h:269
NicType
NIC types.
Definition: nic.h:81
@ NIC_TYPE_UNKNOWN
Unknown interface type.
Definition: nic.h:82
@ NIC_TYPE_LOOPBACK
Loopback interface.
Definition: nic.h:88
@ NIC_TYPE_6LOWPAN
6LoWPAN interface
Definition: nic.h:87
@ NIC_TYPE_IPV6
IPv6 interface.
Definition: nic.h:86
@ NIC_TYPE_IPV4
IPv4 interface.
Definition: nic.h:85
@ NIC_TYPE_ETHERNET
Ethernet interface.
Definition: nic.h:83
@ NIC_TYPE_PPP
PPP interface.
Definition: nic.h:84
void(* SwitchEnableRsvdMcastTable)(NetInterface *interface, bool_t enable)
Definition: nic.h:229
void(* UartEnableIrq)(void)
Definition: nic.h:268
error_t(* SwitchTagFrame)(NetInterface *interface, NetBuffer *buffer, size_t *offset, NetTxAncillary *ancillary)
Definition: nic.h:203
error_t(* UartInit)(void)
Definition: nic.h:267
void(* SwitchEnableMldSnooping)(NetInterface *interface, bool_t enable)
Definition: nic.h:226
void(* SwitchEnableIrq)(NetInterface *interface)
Definition: nic.h:199
error_t(* SwitchGetFdbEntry)(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Definition: nic.h:238
error_t(* SpiSetMode)(uint_t mode)
Definition: nic.h:260
error_t(* SwitchDeleteFdbEntry)(NetInterface *interface, const SwitchFdbEntry *entry)
Definition: nic.h:235
error_t(* SwitchUntagFrame)(NetInterface *interface, uint8_t **frame, size_t *length, NetRxAncillary *ancillary)
Definition: nic.h:206
void nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
Definition: nic.c:548
NicDuplexMode
Duplex mode.
Definition: nic.h:122
@ NIC_FULL_DUPLEX_MODE
Definition: nic.h:125
@ NIC_HALF_DUPLEX_MODE
Definition: nic.h:124
@ NIC_UNKNOWN_DUPLEX_MODE
Definition: nic.h:123
void(* SwitchEventHandler)(NetInterface *interface)
Definition: nic.h:201
bool_t nicIsParentInterface(NetInterface *interface, NetInterface *parent)
Test parent/child relationship between 2 interfaces.
Definition: nic.c:207
SwitchPortState
Switch port state.
Definition: nic.h:134
@ SWITCH_PORT_STATE_UNKNOWN
Definition: nic.h:135
@ SWITCH_PORT_STATE_FORWARDING
Definition: nic.h:140
@ SWITCH_PORT_STATE_LISTENING
Definition: nic.h:138
@ SWITCH_PORT_STATE_BLOCKING
Definition: nic.h:137
@ SWITCH_PORT_STATE_DISABLED
Definition: nic.h:136
@ SWITCH_PORT_STATE_LEARNING
Definition: nic.h:139
error_t(* PhyInit)(NetInterface *interface)
Definition: nic.h:190
NicLinkSpeed
Link speed.
Definition: nic.h:109
@ NIC_LINK_SPEED_100MBPS
Definition: nic.h:112
@ NIC_LINK_SPEED_10MBPS
Definition: nic.h:111
@ NIC_LINK_SPEED_UNKNOWN
Definition: nic.h:110
@ NIC_LINK_SPEED_1GBPS
Definition: nic.h:113
uint32_t systime_t
System time.
External interrupt line driver.
Definition: nic.h:394
ExtIntEnableIrq enableIrq
Definition: nic.h:396
ExtIntInit init
Definition: nic.h:395
ExtIntDisableIrq disableIrq
Definition: nic.h:397
Structure describing a buffer that spans multiple chunks.
Definition: net_mem.h:89
NIC driver.
Definition: nic.h:283
size_t mtu
Definition: nic.h:285
bool_t autoCrcVerif
Definition: nic.h:298
NicWritePhyReg writePhyReg
Definition: nic.h:294
NicSendPacket sendPacket
Definition: nic.h:291
NicDisableIrq disableIrq
Definition: nic.h:289
NicUpdateMacConfig updateMacConfig
Definition: nic.h:293
bool_t autoCrcStrip
Definition: nic.h:299
NicReadPhyReg readPhyReg
Definition: nic.h:295
NicEnableIrq enableIrq
Definition: nic.h:288
bool_t autoCrcCalc
Definition: nic.h:297
bool_t autoPadding
Definition: nic.h:296
NicType type
Definition: nic.h:284
NicUpdateMacAddrFilter updateMacAddrFilter
Definition: nic.h:292
NicTick tick
Definition: nic.h:287
NicEventHandler eventHandler
Definition: nic.h:290
NicInit init
Definition: nic.h:286
Ethernet PHY driver.
Definition: nic.h:308
PhyTick tick
Definition: nic.h:310
PhyEnableIrq enableIrq
Definition: nic.h:311
PhyInit init
Definition: nic.h:309
PhyEventHandler eventHandler
Definition: nic.h:313
PhyDisableIrq disableIrq
Definition: nic.h:312
SMI driver.
Definition: nic.h:354
SmiReadPhyReg readPhyReg
Definition: nic.h:357
SmiWritePhyReg writePhyReg
Definition: nic.h:356
SmiInit init
Definition: nic.h:355
SPI driver.
Definition: nic.h:366
SpiSetMode setMode
Definition: nic.h:368
SpiAssertCs assertCs
Definition: nic.h:370
SpiDeassertCs deassertCs
Definition: nic.h:371
SpiInit init
Definition: nic.h:367
SpiTransfer transfer
Definition: nic.h:372
SpiSetBitrate setBitrate
Definition: nic.h:369
Ethernet switch driver.
Definition: nic.h:322
SwitchTick tick
Definition: nic.h:324
SwitchEnableIrq enableIrq
Definition: nic.h:325
SwitchEnableRsvdMcastTable enableRsvdMcastTable
Definition: nic.h:338
SwitchTagFrame tagFrame
Definition: nic.h:328
SwitchDisableIrq disableIrq
Definition: nic.h:326
SwitchInit init
Definition: nic.h:323
SwitchEnableMldSnooping enableMldSnooping
Definition: nic.h:337
SwitchEventHandler eventHandler
Definition: nic.h:327
SwitchAddFdbEntry addStaticFdbEntry
Definition: nic.h:339
SwitchFlushDynamicFdbTable flushDynamicFdbTable
Definition: nic.h:344
SwitchFlushStaticFdbTable flushStaticFdbTable
Definition: nic.h:342
SwitchEnableIgmpSnooping enableIgmpSnooping
Definition: nic.h:336
SwitchUntagFrame untagFrame
Definition: nic.h:329
SwitchSetUnknownMcastFwdPorts setUnknownMcastFwdPorts
Definition: nic.h:345
SwitchSetAgingTime setAgingTime
Definition: nic.h:335
SwitchGetFdbEntry getDynamicFdbEntry
Definition: nic.h:343
SwitchSetPortState setPortState
Definition: nic.h:333
SwitchGetLinkSpeed getLinkSpeed
Definition: nic.h:331
SwitchGetLinkState getLinkState
Definition: nic.h:330
SwitchGetPortState getPortState
Definition: nic.h:334
SwitchGetFdbEntry getStaticFdbEntry
Definition: nic.h:341
SwitchGetDuplexMode getDuplexMode
Definition: nic.h:332
SwitchDeleteFdbEntry deleteStaticFdbEntry
Definition: nic.h:340
Forwarding database entry.
Definition: nic.h:149
MacAddr macAddr
Definition: nic.h:150
uint32_t destPorts
Definition: nic.h:152
uint8_t srcPort
Definition: nic.h:151
VLAN entry.
Definition: nic.h:162
uint32_t ports
Definition: nic.h:166
uint16_t vlanId
Definition: nic.h:163
bool_t valid
Definition: nic.h:164
uint16_t fid
Definition: nic.h:165
UART driver.
Definition: nic.h:381
UartStartTx startTx
Definition: nic.h:385
UartDisableIrq disableIrq
Definition: nic.h:384
UartEnableIrq enableIrq
Definition: nic.h:383
UartInit init
Definition: nic.h:382
uint8_t length
Definition: tcp.h:368