wilc1000_driver.c
Go to the documentation of this file.
1 /**
2  * @file wilc1000_driver.c
3  * @brief WILC1000 Wi-Fi controller
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2020 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 1.9.8
29  **/
30 
31 //Switch to the appropriate trace level
32 #define TRACE_LEVEL NIC_TRACE_LEVEL
33 
34 //Dependencies
35 #include "driver/include/m2m_wifi.h"
36 #include "core/net.h"
38 #include "wilc1000_config.h"
39 #include "debug.h"
40 
41 //Underlying network interface
42 static NetInterface *wilc1000StaInterface = NULL;
43 static NetInterface *wilc1000ApInterface = NULL;
44 
45 //Transmit buffer
46 static uint8_t txBuffer[WILC1000_TX_BUFFER_SIZE];
47 //Receive buffer
48 static uint8_t rxBuffer[WILC1000_RX_BUFFER_SIZE];
49 
50 
51 /**
52  * @brief WILC1000 driver (STA mode)
53  **/
54 
56 {
58  ETH_MTU,
66  NULL,
67  NULL,
68  NULL,
69  TRUE,
70  TRUE,
71  TRUE,
72  TRUE
73 };
74 
75 
76 /**
77  * @brief WILC1000 driver (AP mode)
78  **/
79 
81 {
83  ETH_MTU,
91  NULL,
92  NULL,
93  NULL,
94  TRUE,
95  TRUE,
96  TRUE,
97  TRUE
98 };
99 
100 
101 /**
102  * @brief WILC1000 initialization
103  * @param[in] interface Underlying network interface
104  * @return Error code
105  **/
106 
108 {
109  int8_t status;
110  tstrWifiInitParam param;
111 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 4)
112  MacAddr staMacAddr;
113  MacAddr apMacAddr;
114 #endif
115 
116  //STA or AP mode?
117  if(interface->nicDriver == &wilc1000StaDriver)
118  {
119  //Debug message
120  TRACE_INFO("Initializing WILC1000 (STA mode)...\r\n");
121  //Save underlying network interface
122  wilc1000StaInterface = interface;
123  }
124  else
125  {
126  //Debug message
127  TRACE_INFO("Initializing WILC1000 (AP mode)...\r\n");
128  //Save underlying network interface
129  wilc1000ApInterface = interface;
130  }
131 
132  //Start of exception handling block
133  do
134  {
135  //Initialization sequence is performed once
136  if(wilc1000StaInterface == NULL || wilc1000ApInterface == NULL)
137  {
138  //Low-level initialization
139  status = nm_bsp_init();
140  //Check status code
141  if(status != M2M_SUCCESS)
142  {
143  break;
144  }
145 
146  //Set default parameters
147  osMemset(&param, 0, sizeof(param));
148 
149  //Register callback functions
150  param.pfAppWifiCb = wilc1000AppWifiEvent;
151  param.pfAppMonCb = NULL;
152 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 3)
153  param.strEthInitParam.pfAppWifiCb = NULL;
154 #endif
155  param.strEthInitParam.pfAppEthCb = wilc1000AppEthEvent;
156 
157  //Set receive buffer
158  param.strEthInitParam.au8ethRcvBuf = rxBuffer;
159  param.strEthInitParam.u16ethRcvBufSize = WILC1000_RX_BUFFER_SIZE;
160 
161  //Initialize WILC1000 controller
162  status = m2m_wifi_init(&param);
163  //Check status code
164  if(status != M2M_SUCCESS)
165  {
166  break;
167  }
168 
169 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 3)
170  //Optionally set the station MAC address
171  if(macCompAddr(&interface->macAddr, &MAC_UNSPECIFIED_ADDR))
172  {
173  //Use the factory preprogrammed station address
174  status = m2m_wifi_get_mac_address(interface->macAddr.b);
175  //Check status code
176  if(status != M2M_SUCCESS)
177  {
178  break;
179  }
180 
181  //Generate the 64-bit interface identifier
182  macAddrToEui64(&interface->macAddr, &interface->eui64);
183  }
184  else
185  {
186  //Override the factory preprogrammed address
187  status = m2m_wifi_set_mac_address(interface->macAddr.b);
188  //Check status code
189  if(status != M2M_SUCCESS)
190  {
191  break;
192  }
193  }
194 #endif
195  }
196  else
197  {
198  //Initialization was already done
199  status = M2M_SUCCESS;
200  }
201 
202 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 3)
203  //STA or AP mode?
204  if(interface->nicDriver == &wilc1000StaDriver)
205  {
206  //Check whether the AP interface has been initialized first
207  if(wilc1000ApInterface != NULL)
208  {
209  //Copy MAC address
210  interface->macAddr = wilc1000ApInterface->macAddr;
211  interface->eui64 = wilc1000ApInterface->eui64;
212  }
213  }
214  else
215  {
216  //Check whether the STA interface has been initialized first
217  if(wilc1000StaInterface != NULL)
218  {
219  //Copy MAC
220  interface->macAddr = wilc1000StaInterface->macAddr;
221  interface->eui64 = wilc1000StaInterface->eui64;
222  }
223  }
224 
225 #elif (M2M_FIRMWARE_VERSION_MAJOR_NO == 4)
226  //Retrieve current MAC addresses
227  status = m2m_wifi_get_mac_address(apMacAddr.b, staMacAddr.b);
228  //Check status code
229  if(status != M2M_SUCCESS)
230  {
231  break;
232  }
233 
234  //Optionally set the MAC address
235  if(macCompAddr(&interface->macAddr, &MAC_UNSPECIFIED_ADDR))
236  {
237  //Use the factory preprogrammed MAC address
238  if(interface == wilc1000StaInterface)
239  {
240  interface->macAddr = staMacAddr;
241  }
242  else
243  {
244  interface->macAddr = apMacAddr;
245  }
246 
247  //Generate the 64-bit interface identifier
248  macAddrToEui64(&interface->macAddr, &interface->eui64);
249  }
250  else
251  {
252  //Override the factory preprogrammed address
253  if(interface == wilc1000StaInterface)
254  {
255  staMacAddr = interface->macAddr;
256  }
257  else
258  {
259  apMacAddr = interface->macAddr;
260  }
261 
262  //Assign MAC addresses
263  status = m2m_wifi_set_mac_address(staMacAddr.b, apMacAddr.b);
264  //Check status code
265  if(status != M2M_SUCCESS)
266  {
267  break;
268  }
269  }
270 #endif
271 
272  //End of exception handling block
273  } while(0);
274 
275  //WILC1000 is now ready to send
276  osSetEvent(&interface->nicTxEvent);
277 
278  //Return status code
279  if(status == M2M_SUCCESS)
280  {
281  return NO_ERROR;
282  }
283  else
284  {
285  return ERROR_FAILURE;
286  }
287 }
288 
289 
290 /**
291  * @brief WILC1000 timer handler
292  *
293  * This routine is periodically called by the TCP/IP stack to handle periodic
294  * operations such as polling the link state
295  *
296  * @param[in] interface Underlying network interface
297  **/
298 
299 void wilc1000Tick(NetInterface *interface)
300 {
301 }
302 
303 
304 /**
305  * @brief Enable interrupts
306  * @param[in] interface Underlying network interface
307  **/
308 
310 {
311 }
312 
313 
314 /**
315  * @brief Disable interrupts
316  * @param[in] interface Underlying network interface
317  **/
318 
320 {
321 }
322 
323 
324 /**
325  * @brief WILC1000 interrupt service routine
326  * @return TRUE if a higher priority task must be woken. Else FALSE is returned
327  **/
328 
330 {
331  bool_t flag;
332 
333  //This flag will be set if a higher priority task must be woken
334  flag = FALSE;
335 
336  //STA and/or AP mode?
337  if(wilc1000StaInterface != NULL)
338  {
339  wilc1000StaInterface->nicEvent = TRUE;
340  }
341  else if(wilc1000ApInterface != NULL)
342  {
343  wilc1000ApInterface->nicEvent = TRUE;
344  }
345 
346  //Notify the TCP/IP stack of the event
347  flag = osSetEventFromIsr(&netEvent);
348 
349  //A higher priority task must be woken?
350  return flag;
351 }
352 
353 
354 /**
355  * @brief WILC1000 event handler
356  * @param[in] interface Underlying network interface
357  **/
358 
360 {
361  //Process Wi-Fi events
362  m2m_wifi_handle_events(NULL);
363 }
364 
365 
366 /**
367  * @brief Send a packet
368  * @param[in] interface Underlying network interface
369  * @param[in] buffer Multi-part buffer containing the data to send
370  * @param[in] offset Offset to the first data byte
371  * @param[in] ancillary Additional options passed to the stack along with
372  * the packet
373  * @return Error code
374  **/
375 
377  const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
378 {
379  int8_t status;
380  size_t length;
381 
382  //Retrieve the length of the packet
383  length = netBufferGetLength(buffer) - offset;
384 
385  //Check the frame length
387  {
388  //The transmitter can accept another packet
389  osSetEvent(&interface->nicTxEvent);
390  //Report an error
391  return ERROR_INVALID_LENGTH;
392  }
393 
394  //Make sure the link is up before transmitting the frame
395  if(!interface->linkState)
396  {
397  //The transmitter can accept another packet
398  osSetEvent(&interface->nicTxEvent);
399  //Drop current packet
400  return NO_ERROR;
401  }
402 
403 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 3)
404  //Copy user data to the transmit buffer
405  netBufferRead(txBuffer, buffer, offset, length);
406 #elif (M2M_FIRMWARE_VERSION_MAJOR_NO == 4)
407  //Copy user data to the transmit buffer
408  netBufferRead(txBuffer + M2M_ETHERNET_HDR_OFFSET + M2M_ETH_PAD_SIZE,
409  buffer, offset, length);
410 #endif
411 
412  //STA or AP mode?
413  if(interface == wilc1000StaInterface)
414  {
415  //Send packet
416 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 4 && M2M_FIRMWARE_VERSION_MINOR_NO >= 2)
417  status = m2m_wifi_send_ethernet_pkt(txBuffer, length, STATION_INTERFACE);
418 #else
419  status = m2m_wifi_send_ethernet_pkt(txBuffer, length);
420 #endif
421  }
422  else
423  {
424  //Send packet
425 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 4 && M2M_FIRMWARE_VERSION_MINOR_NO >= 2)
426  status = m2m_wifi_send_ethernet_pkt(txBuffer, length, AP_INTERFACE);
427 #else
428  status = m2m_wifi_send_ethernet_pkt_ifc1(txBuffer, length);
429 #endif
430  }
431 
432  //The transmitter can accept another packet
433  osSetEvent(&interface->nicTxEvent);
434 
435  //Return status code
436  if(status == M2M_SUCCESS)
437  {
438  return NO_ERROR;
439  }
440  else
441  {
442  return ERROR_FAILURE;
443  }
444 }
445 
446 
447 /**
448  * @brief Configure MAC address filtering
449  * @param[in] interface Underlying network interface
450  * @return Error code
451  **/
452 
454 {
455  uint_t i;
456  uint_t refCount;
457  MacFilterEntry *entry;
458 
459  //Debug message
460  TRACE_INFO("Updating WILC1000 multicast filter...\r\n");
461 
462  //The MAC address filter contains the list of MAC addresses to accept
463  //when receiving an Ethernet frame
464  for(i = 0; i < MAC_ADDR_FILTER_SIZE; i++)
465  {
466  //Point to the current entry
467  entry = &interface->macAddrFilter[i];
468 
469  //Valid entry?
470  if(!macCompAddr(&entry->addr, &MAC_UNSPECIFIED_ADDR))
471  {
472  //Check whether the multicast MAC address has already been registered
473  //on the alternate interface
474  if(interface == wilc1000StaInterface)
475  {
476  refCount = wilc1000GetAddrRefCount(wilc1000ApInterface, &entry->addr);
477  }
478  else
479  {
480  refCount = wilc1000GetAddrRefCount(wilc1000StaInterface, &entry->addr);
481  }
482 
483  //Ensure that there are no duplicate address entries in the table
484  if(refCount == 0)
485  {
486  //Update MAC filter table only if necessary
487  if(entry->addFlag)
488  {
489  //Add a new entry to the MAC filter table
490  m2m_wifi_enable_mac_mcast(entry->addr.b, TRUE);
491  }
492  else if(entry->deleteFlag)
493  {
494  //Remove the current entry from the MAC filter table
495  m2m_wifi_enable_mac_mcast(entry->addr.b, FALSE);
496  }
497  }
498  }
499  }
500 
501  //Successful processing
502  return NO_ERROR;
503 }
504 
505 
506 /**
507  * @brief Get reference count for the specified multicast MAC address
508  * @param[in] interface Underlying network interface
509  * @param[in] macAddr MAC address
510  * @return Reference count
511  **/
512 
514 {
515  uint_t i;
516  uint_t refCount;
517  MacFilterEntry *entry;
518 
519  //Clear reference count
520  refCount = 0;
521 
522  //Valid network interface?
523  if(interface != NULL)
524  {
525  //Go through the multicast filter table
526  for(i = 0; i < MAC_ADDR_FILTER_SIZE; i++)
527  {
528  //Point to the current entry
529  entry = &interface->macAddrFilter[i];
530 
531  //Valid entry?
532  if(entry->refCount > 0)
533  {
534  //Check whether the specified MAC address matches
535  //a multicast address in the table
536  if(macCompAddr(&entry->addr, macAddr))
537  {
538  //Get reference count
539  refCount = entry->refCount;
540  //We are done
541  break;
542  }
543  }
544  }
545  }
546 
547  //Return reference count
548  return refCount;
549 }
550 
551 
552 /**
553  * @brief Callback function that handles Wi-Fi events
554  * @param[in] msgType Type of notification
555  * @param[in] msg Pointer to the buffer containing the notification parameters
556  **/
557 
558 void wilc1000AppWifiEvent(uint8_t msgType, void *msg)
559 {
560  tstrM2mWifiStateChanged *stateChangedMsg;
561 
562  //Debug message
563  TRACE_INFO("WILC1000 Wi-Fi event callback\r\n");
564 
565  //Check message type
566  if(msgType == M2M_WIFI_RESP_FIRMWARE_STRTED)
567  {
568  //Debug message
569  TRACE_INFO(" M2M_WIFI_RESP_FIRMWARE_STRTED\r\n");
570  }
571  else if(msgType == M2M_WIFI_RESP_CON_STATE_CHANGED)
572  {
573  //Debug message
574  TRACE_INFO(" M2M_WIFI_RESP_CON_STATE_CHANGED\r\n");
575 
576  //Connection state
577  stateChangedMsg = (tstrM2mWifiStateChanged *) msg;
578 
579  //Check interface identifier
580 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 4 && M2M_FIRMWARE_VERSION_MINOR_NO >= 2)
581  if(stateChangedMsg->u8IfcId == STATION_INTERFACE)
582 #else
583  if(stateChangedMsg->u8IfcId == INTERFACE_1)
584 #endif
585  {
586  //Check whether STA mode is enabled
587  if(wilc1000StaInterface != NULL)
588  {
589  //Check link state
590  if(stateChangedMsg->u8CurrState == M2M_WIFI_CONNECTED)
591  {
592  //Link is up
593  wilc1000StaInterface->linkState = TRUE;
594  }
595  else
596  {
597  //Link is down
598  wilc1000StaInterface->linkState = FALSE;
599  }
600 
601  //Process link state change event
602  nicNotifyLinkChange(wilc1000StaInterface);
603  }
604  }
605 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 4 && M2M_FIRMWARE_VERSION_MINOR_NO >= 2)
606  else if(stateChangedMsg->u8IfcId == AP_INTERFACE)
607 #else
608  else if(stateChangedMsg->u8IfcId == INTERFACE_2)
609 #endif
610  {
611  //Check whether AP mode is enabled
612  if(wilc1000ApInterface != NULL)
613  {
614  //Check link state
615  if(stateChangedMsg->u8CurrState == M2M_WIFI_CONNECTED)
616  {
617  //Link is up
618  wilc1000ApInterface->linkState = TRUE;
619  }
620  else
621  {
622  //Link is down
623  wilc1000ApInterface->linkState = FALSE;
624  }
625 
626  //Process link state change event
627  nicNotifyLinkChange(wilc1000ApInterface);
628  }
629  }
630  }
631 
632 #if defined(CONF_WILC_EVENT_HOOK)
633  //Release exclusive access
635  //Invoke user callback function
636  CONF_WILC_EVENT_HOOK(msgType, msg);
637  //Get exclusive access
639 #endif
640 }
641 
642 
643 /**
644  * @brief Callback function that handles events in bypass mode
645  * @param[in] msgType Type of notification
646  * @param[in] msg Pointer to the buffer containing the notification parameters
647  * @param[in] ctrlBuf Pointer to the control buffer
648  **/
649 
650 void wilc1000AppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf)
651 {
652  size_t length;
653  uint8_t *packet;
654  NetRxAncillary ancillary;
655 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 4 && M2M_FIRMWARE_VERSION_MINOR_NO >= 2)
656  tstrM2MDataBufCtrl *ctrl;
657 #else
658  tstrM2mIpCtrlBuf *ctrl;
659 #endif
660 
661  //Debug message
662  TRACE_DEBUG("WILC1000 RX event callback\r\n");
663 
664  //Point to the control buffer
665 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 4 && M2M_FIRMWARE_VERSION_MINOR_NO >= 2)
666  ctrl = (tstrM2MDataBufCtrl *) ctrlBuf;
667 #else
668  ctrl = (tstrM2mIpCtrlBuf *) ctrlBuf;
669 #endif
670 
671  //Check message type
672  if(msgType == M2M_WIFI_RESP_ETHERNET_RX_PACKET)
673  {
674  //Debug message
675  TRACE_DEBUG(" M2M_WIFI_RESP_ETHERNET_RX_PACKET\r\n");
676 
677 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 3)
678  //Point to the beginning of the packet
679  packet = rxBuffer;
680 #elif (M2M_FIRMWARE_VERSION_MAJOR_NO == 4)
681  //Point to the beginning of the packet
682  packet = rxBuffer + ctrl->u8DataOffset;
683 #endif
684 
685  //Retrieve the length of the packet
686  length = ctrl->u16DataSize;
687 
688  //Check interface identifier
689 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 4 && M2M_FIRMWARE_VERSION_MINOR_NO >= 2)
690  if(ctrl->u8IfcId == STATION_INTERFACE)
691 #else
692  if(ctrl->u8IfcId == INTERFACE_1)
693 #endif
694  {
695  //Valid interface?
696  if(wilc1000StaInterface != NULL)
697  {
698  //Check destination MAC address
699  if(wilc1000ApInterface != NULL)
700  {
701  if(macCompAddr(packet, wilc1000ApInterface->macAddr.b))
702  {
703  macCopyAddr(packet, wilc1000StaInterface->macAddr.b);
704  }
705  }
706 
707  //Additional options can be passed to the stack along with the packet
708  ancillary = NET_DEFAULT_RX_ANCILLARY;
709 
710  //Pass the packet to the upper layer
711  nicProcessPacket(wilc1000StaInterface, packet, length, &ancillary);
712  }
713  }
714 #if (M2M_FIRMWARE_VERSION_MAJOR_NO == 4 && M2M_FIRMWARE_VERSION_MINOR_NO >= 2)
715  else if(ctrl->u8IfcId == AP_INTERFACE)
716 #else
717  else if(ctrl->u8IfcId == INTERFACE_2)
718 #endif
719  {
720  //Valid interface?
721  if(wilc1000ApInterface != NULL)
722  {
723  //Check destination MAC address
724  if(wilc1000StaInterface != NULL)
725  {
726  if(macCompAddr(packet, wilc1000StaInterface->macAddr.b))
727  {
728  macCopyAddr(packet, wilc1000ApInterface->macAddr.b);
729  }
730  }
731 
732  //Additional options can be passed to the stack along with the packet
733  ancillary = NET_DEFAULT_RX_ANCILLARY;
734 
735  //Pass the packet to the upper layer
736  nicProcessPacket(wilc1000ApInterface, packet, length, &ancillary);
737  }
738  }
739  }
740 }
bool_t osSetEventFromIsr(OsEvent *event)
Set an event object to the signaled state from an interrupt service routine.
void nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
Definition: nic.c:532
error_t wilc1000Init(NetInterface *interface)
WILC1000 initialization.
uint8_t length
Definition: coap_common.h:190
int bool_t
Definition: compiler_port.h:49
#define netEvent
Definition: net_legacy.h:267
#define netMutex
Definition: net_legacy.h:266
void macAddrToEui64(const MacAddr *macAddr, Eui64 *interfaceId)
Map a MAC address to the IPv6 modified EUI-64 identifier.
Definition: ethernet.c:919
size_t netBufferRead(void *dest, const NetBuffer *src, size_t srcOffset, size_t length)
Read data from a multi-part buffer.
Definition: net_mem.c:672
bool_t wilc1000GetAddrRefCount(NetInterface *interface, const MacAddr *macAddr)
Get reference count for the specified multicast MAC address.
Structure describing a buffer that spans multiple chunks.
Definition: net_mem.h:88
#define MAC_ADDR_FILTER_SIZE
Definition: ethernet.h:88
#define TRUE
Definition: os_port.h:50
const NicDriver wilc1000StaDriver
WILC1000 driver (STA mode)
__start_packed struct @5 MacAddr
MAC address.
bool_t addFlag
Definition: ethernet.h:250
error_t wilc1000SendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet.
uint_t refCount
Reference count for the current entry.
Definition: ethernet.h:249
void wilc1000AppWifiEvent(uint8_t msgType, void *msg)
Callback function that handles Wi-Fi events.
void nicProcessPacket(NetInterface *interface, uint8_t *packet, size_t length, NetRxAncillary *ancillary)
Handle a packet received by the network controller.
Definition: nic.c:388
#define macCopyAddr(destMacAddr, srcMacAddr)
Definition: ethernet.h:118
uint8_t msgType
#define WILC1000_RX_BUFFER_SIZE
#define FALSE
Definition: os_port.h:46
void wilc1000DisableIrq(NetInterface *interface)
Disable interrupts.
error_t
Error codes.
Definition: error.h:42
const NetRxAncillary NET_DEFAULT_RX_ANCILLARY
Definition: net_misc.c:96
Generic error code.
Definition: error.h:45
#define txBuffer
#define NetRxAncillary
Definition: net_misc.h:40
#define NetInterface
Definition: net.h:36
MacAddr addr
MAC address.
Definition: ethernet.h:248
#define NetTxAncillary
Definition: net_misc.h:36
error_t wilc1000UpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
#define TRACE_INFO(...)
Definition: debug.h:95
size_t netBufferGetLength(const NetBuffer *buffer)
Get the actual length of a multi-part buffer.
Definition: net_mem.c:297
WILC1000 Wi-Fi controller.
bool_t wilc1000IrqHandler(void)
WILC1000 interrupt service routine.
#define rxBuffer
#define TRACE_DEBUG(...)
Definition: debug.h:107
void wilc1000Tick(NetInterface *interface)
WILC1000 timer handler.
#define ETH_MTU
Definition: ethernet.h:105
MAC filter table entry.
Definition: ethernet.h:246
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
const NicDriver wilc1000ApDriver
WILC1000 driver (AP mode)
void wilc1000EnableIrq(NetInterface *interface)
Enable interrupts.
#define macCompAddr(macAddr1, macAddr2)
Definition: ethernet.h:121
void wilc1000AppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf)
Callback function that handles events in bypass mode.
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
bool_t deleteFlag
Definition: ethernet.h:251
unsigned int uint_t
Definition: compiler_port.h:45
#define osMemset(p, value, length)
Definition: os_port.h:128
TCP/IP stack core.
void wilc1000EventHandler(NetInterface *interface)
WILC1000 event handler.
NIC driver.
Definition: nic.h:257
#define WILC1000_TX_BUFFER_SIZE
const MacAddr MAC_UNSPECIFIED_ADDR
Definition: ethernet.c:56
Success.
Definition: error.h:44
Debugging facilities.
Ethernet interface.
Definition: nic.h:82