w6100_driver.c
Go to the documentation of this file.
1 /**
2  * @file w6100_driver.c
3  * @brief WIZnet W6100 Ethernet controller
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 //Switch to the appropriate trace level
32 #define TRACE_LEVEL NIC_TRACE_LEVEL
33 
34 //Dependencies
35 #include "core/net.h"
37 #include "debug.h"
38 
39 
40 /**
41  * @brief W6100 driver
42  **/
43 
45 {
47  ETH_MTU,
48  w6100Init,
49  w6100Tick,
55  NULL,
56  NULL,
57  NULL,
58  TRUE,
59  TRUE,
60  TRUE,
61  TRUE
62 };
63 
64 
65 /**
66  * @brief W6100 controller initialization
67  * @param[in] interface Underlying network interface
68  * @return Error code
69  **/
70 
72 {
73  uint_t i;
74  uint8_t value;
75 
76  //Debug message
77  TRACE_INFO("Initializing W6100 Ethernet controller...\r\n");
78 
79  //Initialize SPI interface
80  interface->spiDriver->init();
81 
82  //Initialize external interrupt line driver
83  if(interface->extIntDriver != NULL)
84  {
85  interface->extIntDriver->init();
86  }
87 
88  //Wait for the SPI interface to be ready
89  do
90  {
91  //Read chip identification register
93 
94  //Check chip identifier
95  } while(value != W6100_CIDR0_DEFAULT);
96 
97  //Unlock access to chip configuration registers
100 
101  //Perform software reset
103  //Wait for reset completion
104  sleep(10);
105 
106  //Unlock access to network configuration registers
109 
110  //Set the MAC address of the station
112  interface->macAddr.b[0]);
114  interface->macAddr.b[1]);
116  interface->macAddr.b[2]);
118  interface->macAddr.b[3]);
120  interface->macAddr.b[4]);
122  interface->macAddr.b[5]);
123 
124  //Set TX and RX buffer size for socket 0
129 
130  //Sockets 1 to 7 are not used
131  for(i = 1; i <= 7; i++)
132  {
137  }
138 
139  //Configure socket 0 in MACRAW mode
142 
143  //Open socket 0
146 
147  //Wait for command completion
148  do
149  {
150  //Read status register
152 
153  //Check the status of the socket
154  } while(value != W6100_Sn_SR_SOCK_MACRAW);
155 
156  //Configure socket 0 interrupts
159 
160  //Enable socket 0 interrupts
163 
164  //Disable unused interrupts
166 
167  //Enable interrupt pin
170 
171  //Perform custom configuration
172  w6100InitHook(interface);
173 
174  //Dump registers for debugging purpose
175  w6100DumpReg(interface);
176 
177  //Accept any packets from the upper layer
178  osSetEvent(&interface->nicTxEvent);
179 
180  //Force the TCP/IP stack to poll the link state at startup
181  interface->nicEvent = TRUE;
182  //Notify the TCP/IP stack of the event
184 
185  //Successful initialization
186  return NO_ERROR;
187 }
188 
189 
190 /**
191  * @brief W6100 custom configuration
192  * @param[in] interface Underlying network interface
193  **/
194 
195 __weak_func void w6100InitHook(NetInterface *interface)
196 {
197 }
198 
199 
200 /**
201  * @brief W6100 timer handler
202  * @param[in] interface Underlying network interface
203  **/
204 
205 void w6100Tick(NetInterface *interface)
206 {
207  uint8_t value;
208  bool_t linkState;
209 
210  //Read PHY status register
212  //Retrieve current link state
213  linkState = (value & W6100_PHYSR_LNK) ? TRUE : FALSE;
214 
215  //Check link state
216  if(linkState && !interface->linkState)
217  {
218  //Get current speed
219  if((value & W6100_PHYSR_SPD) != 0)
220  {
221  interface->linkSpeed = NIC_LINK_SPEED_10MBPS;
222  }
223  else
224  {
225  interface->linkSpeed = NIC_LINK_SPEED_100MBPS;
226  }
227 
228  //Determine the new duplex mode
229  if((value & W6100_PHYSR_DPX) != 0)
230  {
231  interface->duplexMode = NIC_HALF_DUPLEX_MODE;
232  }
233  else
234  {
235  interface->duplexMode = NIC_FULL_DUPLEX_MODE;
236  }
237 
238  //Link is up
239  interface->linkState = TRUE;
240  //Process link state change event
241  nicNotifyLinkChange(interface);
242  }
243  else if(!linkState && interface->linkState)
244  {
245  //Link is down
246  interface->linkState = FALSE;
247  //Process link state change event
248  nicNotifyLinkChange(interface);
249  }
250  else
251  {
252  //No link change detected
253  }
254 }
255 
256 
257 /**
258  * @brief Enable interrupts
259  * @param[in] interface Underlying network interface
260  **/
261 
262 void w6100EnableIrq(NetInterface *interface)
263 {
264  //Enable interrupts
265  if(interface->extIntDriver != NULL)
266  {
267  interface->extIntDriver->enableIrq();
268  }
269 }
270 
271 
272 /**
273  * @brief Disable interrupts
274  * @param[in] interface Underlying network interface
275  **/
276 
278 {
279  //Disable interrupts
280  if(interface->extIntDriver != NULL)
281  {
282  interface->extIntDriver->disableIrq();
283  }
284 }
285 
286 
287 /**
288  * @brief W6100 interrupt service routine
289  * @param[in] interface Underlying network interface
290  * @return TRUE if a higher priority task must be woken. Else FALSE is returned
291  **/
292 
294 {
295  bool_t flag;
296  uint16_t n;
297  uint8_t isr;
298 
299  //This flag will be set if a higher priority task must be woken
300  flag = FALSE;
301 
302  //Read socket interrupt register
304  //Disable interrupts to release the interrupt line
306 
307  //Socket 0 interrupt?
308  if((isr & W6100_SIR_S0_INT) != 0)
309  {
310  //Read socket 0 interrupt register
312 
313  //Packet transmission complete?
314  if((isr & W6100_Sn_IR_SENDOK) != 0)
315  {
316  //Get the amount of free memory available in the TX buffer
318 
319  //Check whether the TX buffer is available for writing
320  if(n >= ETH_MAX_FRAME_SIZE)
321  {
322  //The transmitter can accept another packet
323  osSetEvent(&interface->nicTxEvent);
324  }
325  }
326 
327  //Packet received?
328  if((isr & W6100_Sn_IR_RECV) != 0)
329  {
330  //Set event flag
331  interface->nicEvent = TRUE;
332  //Notify the TCP/IP stack of the event
333  flag |= osSetEventFromIsr(&netEvent);
334  }
335 
336  //Clear interrupt flags
339  }
340 
341  //Re-enable interrupts once the interrupt has been serviced
344 
345  //A higher priority task must be woken?
346  return flag;
347 }
348 
349 
350 /**
351  * @brief W6100 event handler
352  * @param[in] interface Underlying network interface
353  **/
354 
356 {
357  error_t error;
358 
359  //Process all pending packets
360  do
361  {
362  //Read incoming packet
363  error = w6100ReceivePacket(interface);
364 
365  //No more data in the receive buffer?
366  } while(error != ERROR_BUFFER_EMPTY);
367 }
368 
369 
370 /**
371  * @brief Send a packet
372  * @param[in] interface Underlying network interface
373  * @param[in] buffer Multi-part buffer containing the data to send
374  * @param[in] offset Offset to the first data byte
375  * @param[in] ancillary Additional options passed to the stack along with
376  * the packet
377  * @return Error code
378  **/
379 
381  const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
382 {
383  static uint8_t temp[W6100_ETH_TX_BUFFER_SIZE];
384  uint16_t n;
385  uint16_t p;
386  size_t length;
387 
388  //Retrieve the length of the packet
389  length = netBufferGetLength(buffer) - offset;
390 
391  //Check the frame length
393  {
394  //The transmitter can accept another packet
395  osSetEvent(&interface->nicTxEvent);
396  //Report an error
397  return ERROR_INVALID_LENGTH;
398  }
399 
400  //Get the amount of free memory available in the TX buffer
402 
403  //Make sure the TX buffer is available for writing
404  if(n < length)
405  return ERROR_FAILURE;
406 
407  //Copy user data
408  netBufferRead(temp, buffer, offset, length);
409 
410  //Get TX write pointer
412 
413  //Write TX buffer
415 
416  //Increment TX write pointer
418  p + length);
419 
420  //Start packet transmission
423 
424  //Get the amount of free memory available in the TX buffer
426 
427  //Check whether the TX buffer is available for writing
428  if(n >= ETH_MAX_FRAME_SIZE)
429  {
430  //The transmitter can accept another packet
431  osSetEvent(&interface->nicTxEvent);
432  }
433 
434  //Successful processing
435  return NO_ERROR;
436 }
437 
438 
439 /**
440  * @brief Receive a packet
441  * @param[in] interface Underlying network interface
442  * @return Error code
443  **/
444 
446 {
447  static uint8_t temp[W6100_ETH_RX_BUFFER_SIZE];
448  error_t error;
449  uint16_t p;
450  size_t length;
451 
452  //Get the amount of data in the RX buffer
454 
455  //Any packet pending in the receive buffer?
456  if(length > 0)
457  {
458  //Get RX read pointer
460 
461  //Read packet header
462  w6100ReadBuffer(interface, W6100_CTRL_BSB_S0_RX_BUFFER, p, temp, 2);
463 
464  //Retrieve the length of the received packet
465  length = LOAD16BE(temp);
466 
467  //Ensure the packet size is acceptable
468  if(length >= 2 && length <= (ETH_MAX_FRAME_SIZE + 2))
469  {
470  //Calculate the length of the packet data
471  length -= 2;
472 
473  //Read packet data
474  w6100ReadBuffer(interface, W6100_CTRL_BSB_S0_RX_BUFFER, p + 2, temp,
475  length);
476 
477  //Increment RX read pointer
479  p + length + 2);
480 
481  //Complete the processing of the receive data
484 
485  //Successful processing
486  error = NO_ERROR;
487  }
488  else
489  {
490  //The packet length is not valid
491  error = ERROR_INVALID_LENGTH;
492  }
493  }
494  else
495  {
496  //No more data in the receive buffer
497  error = ERROR_BUFFER_EMPTY;
498  }
499 
500  //Check whether a valid packet has been received
501  if(!error)
502  {
503  NetRxAncillary ancillary;
504 
505  //Additional options can be passed to the stack along with the packet
506  ancillary = NET_DEFAULT_RX_ANCILLARY;
507 
508  //Pass the packet to the upper layer
509  nicProcessPacket(interface, temp, length, &ancillary);
510  }
511 
512  //Return status code
513  return error;
514 }
515 
516 
517 /**
518  * @brief Configure MAC address filtering
519  * @param[in] interface Underlying network interface
520  * @return Error code
521  **/
522 
524 {
525  //Not implemented
526  return NO_ERROR;
527 }
528 
529 
530 /**
531  * @brief Write 8-bit register
532  * @param[in] interface Underlying network interface
533  * @param[in] control Control byte
534  * @param[in] address Register address
535  * @param[in] data Register value
536  **/
537 
538 void w6100WriteReg8(NetInterface *interface, uint8_t control,
539  uint16_t address, uint8_t data)
540 {
541  //Pull the CS pin low
542  interface->spiDriver->assertCs();
543 
544  //Address phase
545  interface->spiDriver->transfer(MSB(address));
546  interface->spiDriver->transfer(LSB(address));
547 
548  //Control phase
549  interface->spiDriver->transfer(control | W6100_CTRL_RWB_WRITE |
551 
552  //Data phase
553  interface->spiDriver->transfer(data);
554 
555  //Terminate the operation by raising the CS pin
556  interface->spiDriver->deassertCs();
557 }
558 
559 
560 /**
561  * @brief Read 8-bit register
562  * @param[in] interface Underlying network interface
563  * @param[in] control Control byte
564  * @param[in] address Register address
565  * @return Register value
566  **/
567 
568 uint8_t w6100ReadReg8(NetInterface *interface, uint8_t control,
569  uint16_t address)
570 {
571  uint8_t data;
572 
573  //Pull the CS pin low
574  interface->spiDriver->assertCs();
575 
576  //Address phase
577  interface->spiDriver->transfer(MSB(address));
578  interface->spiDriver->transfer(LSB(address));
579 
580  //Control phase
581  interface->spiDriver->transfer(control | W6100_CTRL_RWB_READ |
583 
584  //Data phase
585  data = interface->spiDriver->transfer(0x00);
586 
587  //Terminate the operation by raising the CS pin
588  interface->spiDriver->deassertCs();
589 
590  //Return register value
591  return data;
592 }
593 
594 
595 /**
596  * @brief Write 16-bit register
597  * @param[in] interface Underlying network interface
598  * @param[in] control Control byte
599  * @param[in] address Register address
600  * @param[in] data Register value
601  **/
602 
603 void w6100WriteReg16(NetInterface *interface, uint8_t control,
604  uint16_t address, uint16_t data)
605 {
606  //Pull the CS pin low
607  interface->spiDriver->assertCs();
608 
609  //Address phase
610  interface->spiDriver->transfer(MSB(address));
611  interface->spiDriver->transfer(LSB(address));
612 
613  //Control phase
614  interface->spiDriver->transfer(control | W6100_CTRL_RWB_WRITE |
616 
617  //Data phase
618  interface->spiDriver->transfer(MSB(data));
619  interface->spiDriver->transfer(LSB(data));
620 
621  //Terminate the operation by raising the CS pin
622  interface->spiDriver->deassertCs();
623 }
624 
625 
626 /**
627  * @brief Read 16-bit register
628  * @param[in] interface Underlying network interface
629  * @param[in] control Control byte
630  * @param[in] address Register address
631  * @return Register value
632  **/
633 
634 uint16_t w6100ReadReg16(NetInterface *interface, uint8_t control,
635  uint16_t address)
636 {
637  uint16_t data;
638 
639  //Pull the CS pin low
640  interface->spiDriver->assertCs();
641 
642  //Address phase
643  interface->spiDriver->transfer(MSB(address));
644  interface->spiDriver->transfer(LSB(address));
645 
646  //Control phase
647  interface->spiDriver->transfer(control | W6100_CTRL_RWB_READ |
649 
650  //Data phase
651  data = interface->spiDriver->transfer(0x00) << 8;
652  data |= interface->spiDriver->transfer(0x00);
653 
654  //Terminate the operation by raising the CS pin
655  interface->spiDriver->deassertCs();
656 
657  //Return register value
658  return data;
659 }
660 
661 
662 /**
663  * @brief Write TX buffer
664  * @param[in] interface Underlying network interface
665  * @param[in] control Control byte
666  * @param[in] address Buffer address
667  * @param[in] data Pointer to the data being written
668  * @param[in] length Number of data to write
669  **/
670 
671 void w6100WriteBuffer(NetInterface *interface, uint8_t control,
672  uint16_t address, const uint8_t *data, size_t length)
673 {
674  size_t i;
675 
676  //Pull the CS pin low
677  interface->spiDriver->assertCs();
678 
679  //Address phase
680  interface->spiDriver->transfer(MSB(address));
681  interface->spiDriver->transfer(LSB(address));
682 
683  //Control phase
684  interface->spiDriver->transfer(control | W6100_CTRL_RWB_WRITE |
686 
687  //Data phase
688  for(i = 0; i < length; i++)
689  {
690  interface->spiDriver->transfer(data[i]);
691  }
692 
693  //Terminate the operation by raising the CS pin
694  interface->spiDriver->deassertCs();
695 }
696 
697 
698 /**
699  * @brief Read RX buffer
700  * @param[in] interface Underlying network interface
701  * @param[in] control Control byte
702  * @param[in] address Buffer address
703  * @param[out] data Buffer where to store the incoming data
704  * @param[in] length Number of data to read
705  **/
706 
707 void w6100ReadBuffer(NetInterface *interface, uint8_t control,
708  uint16_t address, uint8_t *data, size_t length)
709 {
710  size_t i;
711 
712  //Pull the CS pin low
713  interface->spiDriver->assertCs();
714 
715  //Address phase
716  interface->spiDriver->transfer(MSB(address));
717  interface->spiDriver->transfer(LSB(address));
718 
719  //Control phase
720  interface->spiDriver->transfer(control | W6100_CTRL_RWB_READ |
722 
723  //Data phase
724  for(i = 0; i < length; i++)
725  {
726  data[i] = interface->spiDriver->transfer(0x00);
727  }
728 
729  //Terminate the operation by raising the CS pin
730  interface->spiDriver->deassertCs();
731 }
732 
733 
734 /**
735  * @brief Dump registers for debugging purpose
736  * @param[in] interface Underlying network interface
737  **/
738 
739 void w6100DumpReg(NetInterface *interface)
740 {
741  uint16_t i;
742 
743  //Loop through registers
744  for(i = 0; i < 4; i++)
745  {
746  //Display current host MAC register
747  TRACE_DEBUG("%02" PRIX16 ": 0x%02" PRIX8 "\r\n", i,
749  }
750 
751  //Terminate with a line feed
752  TRACE_DEBUG("\r\n");
753 }
unsigned int uint_t
Definition: compiler_port.h:50
int bool_t
Definition: compiler_port.h:53
#define LOAD16BE(p)
Definition: cpu_endian.h:186
Debugging facilities.
#define TRACE_DEBUG(...)
Definition: debug.h:107
#define TRACE_INFO(...)
Definition: debug.h:95
uint8_t n
error_t
Error codes.
Definition: error.h:43
@ ERROR_BUFFER_EMPTY
Definition: error.h:141
@ NO_ERROR
Success.
Definition: error.h:44
@ ERROR_INVALID_LENGTH
Definition: error.h:111
@ ERROR_FAILURE
Generic error code.
Definition: error.h:45
#define ETH_MTU
Definition: ethernet.h:116
uint8_t data[]
Definition: ethernet.h:222
#define ETH_MAX_FRAME_SIZE
Definition: ethernet.h:110
uint8_t control
Definition: ethernet.h:234
Ipv6Addr address[]
Definition: ipv6.h:316
uint8_t p
Definition: ndp.h:300
TCP/IP stack core.
#define NetInterface
Definition: net.h:36
#define netEvent
Definition: net_legacy.h:196
size_t netBufferGetLength(const NetBuffer *buffer)
Get the actual length of a multi-part buffer.
Definition: net_mem.c:297
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:674
const NetRxAncillary NET_DEFAULT_RX_ANCILLARY
Definition: net_misc.c:101
#define NetRxAncillary
Definition: net_misc.h:40
#define NetTxAncillary
Definition: net_misc.h:36
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 nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
Definition: nic.c:548
@ NIC_TYPE_ETHERNET
Ethernet interface.
Definition: nic.h:83
@ NIC_FULL_DUPLEX_MODE
Definition: nic.h:125
@ NIC_HALF_DUPLEX_MODE
Definition: nic.h:124
@ NIC_LINK_SPEED_100MBPS
Definition: nic.h:112
@ NIC_LINK_SPEED_10MBPS
Definition: nic.h:111
#define LSB(x)
Definition: os_port.h:55
#define TRUE
Definition: os_port.h:50
#define FALSE
Definition: os_port.h:46
#define MSB(x)
Definition: os_port.h:59
#define sleep(delay)
Definition: os_port.h:301
bool_t osSetEventFromIsr(OsEvent *event)
Set an event object to the signaled state from an interrupt service routine.
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Structure describing a buffer that spans multiple chunks.
Definition: net_mem.h:89
NIC driver.
Definition: nic.h:283
uint8_t length
Definition: tcp.h:368
uint8_t value[]
Definition: tcp.h:369
__weak_func void w6100InitHook(NetInterface *interface)
W6100 custom configuration.
Definition: w6100_driver.c:195
void w6100WriteReg16(NetInterface *interface, uint8_t control, uint16_t address, uint16_t data)
Write 16-bit register.
Definition: w6100_driver.c:603
void w6100DisableIrq(NetInterface *interface)
Disable interrupts.
Definition: w6100_driver.c:277
void w6100ReadBuffer(NetInterface *interface, uint8_t control, uint16_t address, uint8_t *data, size_t length)
Read RX buffer.
Definition: w6100_driver.c:707
uint8_t w6100ReadReg8(NetInterface *interface, uint8_t control, uint16_t address)
Read 8-bit register.
Definition: w6100_driver.c:568
void w6100WriteReg8(NetInterface *interface, uint8_t control, uint16_t address, uint8_t data)
Write 8-bit register.
Definition: w6100_driver.c:538
void w6100WriteBuffer(NetInterface *interface, uint8_t control, uint16_t address, const uint8_t *data, size_t length)
Write TX buffer.
Definition: w6100_driver.c:671
error_t w6100ReceivePacket(NetInterface *interface)
Receive a packet.
Definition: w6100_driver.c:445
void w6100EnableIrq(NetInterface *interface)
Enable interrupts.
Definition: w6100_driver.c:262
void w6100DumpReg(NetInterface *interface)
Dump registers for debugging purpose.
Definition: w6100_driver.c:739
bool_t w6100IrqHandler(NetInterface *interface)
W6100 interrupt service routine.
Definition: w6100_driver.c:293
uint16_t w6100ReadReg16(NetInterface *interface, uint8_t control, uint16_t address)
Read 16-bit register.
Definition: w6100_driver.c:634
error_t w6100Init(NetInterface *interface)
W6100 controller initialization.
Definition: w6100_driver.c:71
void w6100Tick(NetInterface *interface)
W6100 timer handler.
Definition: w6100_driver.c:205
const NicDriver w6100Driver
W6100 driver.
Definition: w6100_driver.c:44
error_t w6100SendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet.
Definition: w6100_driver.c:380
void w6100EventHandler(NetInterface *interface)
W6100 event handler.
Definition: w6100_driver.c:355
error_t w6100UpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
Definition: w6100_driver.c:523
WIZnet W6100 Ethernet controller.
#define W6100_Sn_TX_WR0
Definition: w6100_driver.h:362
#define W6100_NETLCKR
Definition: w6100_driver.h:296
#define W6100_Sn_IRCLR_RECV
Definition: w6100_driver.h:615
#define W6100_SYCR1
Definition: w6100_driver.h:94
#define W6100_Sn_RX_RD0
Definition: w6100_driver.h:367
#define W6100_Sn_CR_RECV
Definition: w6100_driver.h:594
#define W6100_CTRL_OM_VDM
Definition: w6100_driver.h:82
#define W6100_SIR
Definition: w6100_driver.h:99
#define W6100_PHYSR_DPX
Definition: w6100_driver.h:491
#define W6100_ETH_TX_BUFFER_SIZE
Definition: w6100_driver.h:39
#define W6100_SHAR4
Definition: w6100_driver.h:138
#define W6100_ETH_RX_BUFFER_SIZE
Definition: w6100_driver.h:46
#define W6100_Sn_RX_BSR_0KB
Definition: w6100_driver.h:659
#define W6100_Sn_MR_MF
Definition: w6100_driver.h:560
#define W6100_SHAR1
Definition: w6100_driver.h:135
#define W6100_SIMR_S0_INT
Definition: w6100_driver.h:447
#define W6100_Sn_SR
Definition: w6100_driver.h:313
#define W6100_Sn_IMR
Definition: w6100_driver.h:311
#define W6100_PHYSR_LNK
Definition: w6100_driver.h:493
#define W6100_CHPLCKR_UNLOCK
Definition: w6100_driver.h:548
#define W6100_Sn_IRCLR_SENDOK
Definition: w6100_driver.h:613
#define W6100_CTRL_OM_FDM2
Definition: w6100_driver.h:84
#define W6100_CTRL_BSB_S0_RX_BUFFER
Definition: w6100_driver.h:56
#define W6100_CTRL_BSB_S0_TX_BUFFER
Definition: w6100_driver.h:55
#define W6100_CTRL_BSB_Sn_REG(n)
Definition: w6100_driver.h:667
#define W6100_Sn_IR_SENDOK
Definition: w6100_driver.h:599
#define W6100_IMR
Definition: w6100_driver.h:101
#define W6100_Sn_IRCLR
Definition: w6100_driver.h:312
#define W6100_SHAR2
Definition: w6100_driver.h:136
#define W6100_PHYSR
Definition: w6100_driver.h:108
#define W6100_Sn_TX_BSR
Definition: w6100_driver.h:357
#define W6100_Sn_IR_RECV
Definition: w6100_driver.h:601
#define W6100_CTRL_OM_FDM1
Definition: w6100_driver.h:83
#define W6100_SIR_S0_INT
Definition: w6100_driver.h:413
#define W6100_Sn_IMR_SENDOK
Definition: w6100_driver.h:606
#define W6100_SHAR5
Definition: w6100_driver.h:139
#define W6100_Sn_RX_RSR0
Definition: w6100_driver.h:365
#define W6100_SIMR
Definition: w6100_driver.h:103
#define W6100_SHAR0
Definition: w6100_driver.h:134
#define W6100_CTRL_RWB_WRITE
Definition: w6100_driver.h:80
#define W6100_SHAR3
Definition: w6100_driver.h:137
#define W6100_PHYSR_SPD
Definition: w6100_driver.h:492
#define W6100_Sn_CR_SEND
Definition: w6100_driver.h:592
#define W6100_Sn_IR
Definition: w6100_driver.h:310
#define W6100_Sn_CR
Definition: w6100_driver.h:309
#define W6100_Sn_TX_FSR0
Definition: w6100_driver.h:358
#define W6100_CTRL_BSB_S0_REG
Definition: w6100_driver.h:54
#define W6100_CHPLCKR
Definition: w6100_driver.h:295
#define W6100_Sn_TX_BSR_0KB
Definition: w6100_driver.h:651
#define W6100_CIDR0_DEFAULT
Definition: w6100_driver.h:373
#define W6100_NETLCKR_UNLOCK
Definition: w6100_driver.h:551
#define W6100_Sn_SR_SOCK_MACRAW
Definition: w6100_driver.h:633
#define W6100_Sn_CR_OPEN
Definition: w6100_driver.h:587
#define W6100_CIDR0
Definition: w6100_driver.h:88
#define W6100_Sn_MR
Definition: w6100_driver.h:307
#define W6100_CTRL_BSB_COMMON_REG
Definition: w6100_driver.h:53
#define W6100_CTRL_RWB_READ
Definition: w6100_driver.h:79
#define W6100_Sn_RX_BSR
Definition: w6100_driver.h:364
#define W6100_Sn_RX_BSR_16KB
Definition: w6100_driver.h:664
#define W6100_SYCR1_IEN
Definition: w6100_driver.h:395
#define W6100_Sn_MR_PROTOCOL_MACRAW
Definition: w6100_driver.h:574
#define W6100_Sn_TX_BSR_16KB
Definition: w6100_driver.h:656
#define W6100_SYCR0
Definition: w6100_driver.h:93
#define W6100_Sn_IMR_RECV
Definition: w6100_driver.h:608