Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ENC28J60 Ethernet controller. More...
Go to the source code of this file.
Functions | |
error_t | enc28j60Init (NetInterface *interface) |
ENC28J60 controller initialization. | |
void | enc28j60Tick (NetInterface *interface) |
ENC28J60 timer handler. | |
void | enc28j60EnableIrq (NetInterface *interface) |
Enable interrupts. | |
void | enc28j60DisableIrq (NetInterface *interface) |
Disable interrupts. | |
bool_t | enc28j60IrqHandler (NetInterface *interface) |
ENC28J60 interrupt service routine. | |
void | enc28j60EventHandler (NetInterface *interface) |
ENC28J60 event handler. | |
error_t | enc28j60SendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset) |
Send a packet. | |
error_t | enc28j60ReceivePacket (NetInterface *interface) |
Receive a packet. | |
error_t | enc28j60SetMulticastFilter (NetInterface *interface) |
Configure multicast MAC address filtering. | |
void | enc28j60SoftReset (NetInterface *interface) |
ENC28J60 controller reset. | |
void | enc28j60SelectBank (NetInterface *interface, uint16_t address) |
Bank selection. | |
void | enc28j60WriteReg (NetInterface *interface, uint16_t address, uint8_t data) |
Write ENC28J60 register. | |
uint8_t | enc28j60ReadReg (NetInterface *interface, uint16_t address) |
Read ENC28J60 register. | |
void | enc28j60WritePhyReg (NetInterface *interface, uint16_t address, uint16_t data) |
Write PHY register. | |
uint16_t | enc28j60ReadPhyReg (NetInterface *interface, uint16_t address) |
Read PHY register. | |
void | enc28j60WriteBuffer (NetInterface *interface, const NetBuffer *buffer, size_t offset) |
Write SRAM buffer. | |
void | enc28j60ReadBuffer (NetInterface *interface, uint8_t *data, size_t length) |
Read SRAM buffer. | |
void | enc28j60SetBit (NetInterface *interface, uint16_t address, uint16_t mask) |
Set bit field. | |
void | enc28j60ClearBit (NetInterface *interface, uint16_t address, uint16_t mask) |
Clear bit field. | |
uint32_t | enc28j60CalcCrc (const void *data, size_t length) |
CRC calculation using the polynomial 0x4C11DB7. | |
void | enc28j60DumpReg (NetInterface *interface) |
Dump registers for debugging purpose. | |
void | enc28j60DumpPhyReg (NetInterface *interface) |
Dump PHY registers for debugging purpose. | |
Variables | |
const NicDriver | enc28j60Driver |
ENC28J60 driver. |
Detailed Description
ENC28J60 Ethernet controller.
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version:
- 1.7.6
Definition in file enc28j60.c.
Function Documentation
uint32_t enc28j60CalcCrc | ( | const void * | data, |
size_t | length | ||
) |
CRC calculation using the polynomial 0x4C11DB7.
- Parameters:
-
[in] data Pointer to the data over which to calculate the CRC [in] length Number of bytes to process
- Returns:
- Resulting CRC value
Definition at line 920 of file enc28j60.c.
void enc28j60ClearBit | ( | NetInterface * | interface, |
uint16_t | address, | ||
uint16_t | mask | ||
) |
Clear bit field.
- Parameters:
-
[in] interface Underlying network interface [in] address Register address [in] mask Bits to clear in the target register
Definition at line 898 of file enc28j60.c.
void enc28j60DisableIrq | ( | NetInterface * | interface ) |
Disable interrupts.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 256 of file enc28j60.c.
void enc28j60DumpPhyReg | ( | NetInterface * | interface ) |
Dump PHY registers for debugging purpose.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 1003 of file enc28j60.c.
void enc28j60DumpReg | ( | NetInterface * | interface ) |
Dump registers for debugging purpose.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 954 of file enc28j60.c.
void enc28j60EnableIrq | ( | NetInterface * | interface ) |
Enable interrupts.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 244 of file enc28j60.c.
void enc28j60EventHandler | ( | NetInterface * | interface ) |
ENC28J60 event handler.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 331 of file enc28j60.c.
error_t enc28j60Init | ( | NetInterface * | interface ) |
ENC28J60 controller initialization.
- Parameters:
-
[in] interface Underlying network interface
- Returns:
- Error code
Definition at line 70 of file enc28j60.c.
bool_t enc28j60IrqHandler | ( | NetInterface * | interface ) |
ENC28J60 interrupt service routine.
- Parameters:
-
[in] interface Underlying network interface
- Returns:
- TRUE if a higher priority task must be woken. Else FALSE is returned
Definition at line 269 of file enc28j60.c.
void enc28j60ReadBuffer | ( | NetInterface * | interface, |
uint8_t * | data, | ||
size_t | length | ||
) |
Read SRAM buffer.
- Parameters:
-
[in] interface Underlying network interface [in] data Buffer where to store the incoming data [in] length Number of data to read
Definition at line 849 of file enc28j60.c.
uint16_t enc28j60ReadPhyReg | ( | NetInterface * | interface, |
uint16_t | address | ||
) |
Read PHY register.
- Parameters:
-
[in] interface Underlying network interface [in] address PHY register address
- Returns:
- Register value
Definition at line 765 of file enc28j60.c.
uint8_t enc28j60ReadReg | ( | NetInterface * | interface, |
uint16_t | address | ||
) |
Read ENC28J60 register.
- Parameters:
-
[in] interface Underlying network interface [in] address Register address
- Returns:
- Register value
Definition at line 708 of file enc28j60.c.
error_t enc28j60ReceivePacket | ( | NetInterface * | interface ) |
Receive a packet.
- Parameters:
-
[in] interface Underlying network interface
- Returns:
- Error code
Definition at line 468 of file enc28j60.c.
void enc28j60SelectBank | ( | NetInterface * | interface, |
uint16_t | address | ||
) |
Bank selection.
- Parameters:
-
[in] interface Underlying network interface [in] address Register address
Definition at line 630 of file enc28j60.c.
Send a packet.
- Parameters:
-
[in] interface Underlying network interface [in] buffer Multi-part buffer containing the data to send [in] offset Offset to the first data byte
- Returns:
- Error code
Definition at line 405 of file enc28j60.c.
void enc28j60SetBit | ( | NetInterface * | interface, |
uint16_t | address, | ||
uint16_t | mask | ||
) |
Set bit field.
- Parameters:
-
[in] interface Underlying network interface [in] address Register address [in] mask Bits to set in the target register
Definition at line 876 of file enc28j60.c.
error_t enc28j60SetMulticastFilter | ( | NetInterface * | interface ) |
Configure multicast MAC address filtering.
- Parameters:
-
[in] interface Underlying network interface
- Returns:
- Error code
Definition at line 548 of file enc28j60.c.
void enc28j60SoftReset | ( | NetInterface * | interface ) |
ENC28J60 controller reset.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 611 of file enc28j60.c.
void enc28j60Tick | ( | NetInterface * | interface ) |
ENC28J60 timer handler.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 234 of file enc28j60.c.
void enc28j60WriteBuffer | ( | NetInterface * | interface, |
const NetBuffer * | buffer, | ||
size_t | offset | ||
) |
Write SRAM buffer.
- Parameters:
-
[in] interface Underlying network interface [in] buffer Multi-part buffer containing the data to be written [in] offset Offset to the first data byte
Definition at line 796 of file enc28j60.c.
void enc28j60WritePhyReg | ( | NetInterface * | interface, |
uint16_t | address, | ||
uint16_t | data | ||
) |
Write PHY register.
- Parameters:
-
[in] interface Underlying network interface [in] address PHY register address [in] data Register value
Definition at line 743 of file enc28j60.c.
void enc28j60WriteReg | ( | NetInterface * | interface, |
uint16_t | address, | ||
uint8_t | data | ||
) |
Write ENC28J60 register.
- Parameters:
-
[in] interface Underlying network interface [in] address Register address [in] data Register value
Definition at line 683 of file enc28j60.c.
Variable Documentation
const NicDriver enc28j60Driver |
{ NIC_TYPE_ETHERNET, ETH_MTU, enc28j60Init, enc28j60Tick, enc28j60EnableIrq, enc28j60DisableIrq, enc28j60EventHandler, enc28j60SendPacket, enc28j60SetMulticastFilter, NULL, NULL, NULL, TRUE, TRUE, TRUE, FALSE }
ENC28J60 driver.
Definition at line 43 of file enc28j60.c.
Generated on Tue Jul 12 2022 17:10:19 by
