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