ENC424J600 Ethernet controller. More...
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL NIC_TRACE_LEVEL |
Functions | |
error_t | enc424j600Init (NetInterface *interface) |
ENC424J600 controller initialization. More... | |
__weak_func void | enc424j600InitHook (NetInterface *interface) |
ENC424J600 custom configuration. More... | |
void | enc424j600Tick (NetInterface *interface) |
ENC424J600 timer handler. More... | |
void | enc424j600EnableIrq (NetInterface *interface) |
Enable interrupts. More... | |
void | enc424j600DisableIrq (NetInterface *interface) |
Disable interrupts. More... | |
bool_t | enc424j600IrqHandler (NetInterface *interface) |
ENC424J600 interrupt service routine. More... | |
void | enc424j600EventHandler (NetInterface *interface) |
ENC424J600 event handler. More... | |
error_t | enc424j600SendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary) |
Send a packet. More... | |
error_t | enc424j600ReceivePacket (NetInterface *interface) |
Receive a packet. More... | |
error_t | enc424j600UpdateMacAddrFilter (NetInterface *interface) |
Configure MAC address filtering. More... | |
void | enc424j600UpdateMacConfig (NetInterface *interface) |
Adjust MAC configuration parameters for proper operation. More... | |
error_t | enc424j600SoftReset (NetInterface *interface) |
Reset ENC424J600 controller. More... | |
void | enc424j600WriteReg (NetInterface *interface, uint8_t address, uint16_t data) |
Write ENC424J600 register. More... | |
uint16_t | enc424j600ReadReg (NetInterface *interface, uint8_t address) |
Read ENC424J600 register. More... | |
void | enc424j600WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data) |
Write PHY register. More... | |
uint16_t | enc424j600ReadPhyReg (NetInterface *interface, uint8_t address) |
Read PHY register. More... | |
void | enc424j600WriteBuffer (NetInterface *interface, uint8_t opcode, const NetBuffer *buffer, size_t offset) |
Write SRAM buffer. More... | |
void | enc424j600ReadBuffer (NetInterface *interface, uint8_t opcode, uint8_t *data, size_t length) |
Read SRAM buffer. More... | |
void | enc424j600SetBit (NetInterface *interface, uint8_t address, uint16_t mask) |
Set bit field. More... | |
void | enc424j600ClearBit (NetInterface *interface, uint8_t address, uint16_t mask) |
Clear bit field. More... | |
uint32_t | enc424j600CalcCrc (const void *data, size_t length) |
CRC calculation using the polynomial 0x4C11DB7. More... | |
void | enc424j600DumpReg (NetInterface *interface) |
Dump registers for debugging purpose. More... | |
void | enc424j600DumpPhyReg (NetInterface *interface) |
Dump PHY registers for debugging purpose. More... | |
Variables | |
const NicDriver | enc424j600Driver |
ENC424J600 driver. More... | |
Detailed Description
ENC424J600 Ethernet controller.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 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
- 2.4.4
Definition in file enc424j600_driver.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL NIC_TRACE_LEVEL |
Definition at line 32 of file enc424j600_driver.c.
Function Documentation
◆ enc424j600CalcCrc()
uint32_t enc424j600CalcCrc | ( | 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 947 of file enc424j600_driver.c.
◆ enc424j600ClearBit()
void enc424j600ClearBit | ( | NetInterface * | interface, |
uint8_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 921 of file enc424j600_driver.c.
◆ enc424j600DisableIrq()
void enc424j600DisableIrq | ( | NetInterface * | interface | ) |
Disable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 228 of file enc424j600_driver.c.
◆ enc424j600DumpPhyReg()
void enc424j600DumpPhyReg | ( | NetInterface * | interface | ) |
Dump PHY registers for debugging purpose.
- Parameters
-
[in] interface Underlying network interface
Definition at line 1027 of file enc424j600_driver.c.
◆ enc424j600DumpReg()
void enc424j600DumpReg | ( | NetInterface * | interface | ) |
Dump registers for debugging purpose.
- Parameters
-
[in] interface Underlying network interface
Definition at line 987 of file enc424j600_driver.c.
◆ enc424j600EnableIrq()
void enc424j600EnableIrq | ( | NetInterface * | interface | ) |
Enable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 213 of file enc424j600_driver.c.
◆ enc424j600EventHandler()
void enc424j600EventHandler | ( | NetInterface * | interface | ) |
ENC424J600 event handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 307 of file enc424j600_driver.c.
◆ enc424j600Init()
error_t enc424j600Init | ( | NetInterface * | interface | ) |
ENC424J600 controller initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 71 of file enc424j600_driver.c.
◆ enc424j600InitHook()
__weak_func void enc424j600InitHook | ( | NetInterface * | interface | ) |
ENC424J600 custom configuration.
- Parameters
-
[in] interface Underlying network interface
Definition at line 193 of file enc424j600_driver.c.
◆ enc424j600IrqHandler()
bool_t enc424j600IrqHandler | ( | NetInterface * | interface | ) |
ENC424J600 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 244 of file enc424j600_driver.c.
◆ enc424j600ReadBuffer()
void enc424j600ReadBuffer | ( | NetInterface * | interface, |
uint8_t | opcode, | ||
uint8_t * | data, | ||
size_t | length | ||
) |
Read SRAM buffer.
- Parameters
-
[in] interface Underlying network interface [in] opcode SRAM buffer operation [out] data Buffer where to store the incoming data [in] length Number of data to read
Definition at line 866 of file enc424j600_driver.c.
◆ enc424j600ReadPhyReg()
uint16_t enc424j600ReadPhyReg | ( | NetInterface * | interface, |
uint8_t | address | ||
) |
Read PHY register.
- Parameters
-
[in] interface Underlying network interface [in] address PHY register address
- Returns
- Register value
Definition at line 774 of file enc424j600_driver.c.
◆ enc424j600ReadReg()
uint16_t enc424j600ReadReg | ( | NetInterface * | interface, |
uint8_t | address | ||
) |
Read ENC424J600 register.
- Parameters
-
[in] interface Underlying network interface [in] address Register address
- Returns
- Register value
Definition at line 714 of file enc424j600_driver.c.
◆ enc424j600ReceivePacket()
error_t enc424j600ReceivePacket | ( | NetInterface * | interface | ) |
Receive a packet.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 458 of file enc424j600_driver.c.
◆ enc424j600SendPacket()
error_t enc424j600SendPacket | ( | NetInterface * | interface, |
const NetBuffer * | buffer, | ||
size_t | offset, | ||
NetTxAncillary * | ancillary | ||
) |
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 [in] ancillary Additional options passed to the stack along with the packet
- Returns
- Error code
Definition at line 398 of file enc424j600_driver.c.
◆ enc424j600SetBit()
void enc424j600SetBit | ( | NetInterface * | interface, |
uint8_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 895 of file enc424j600_driver.c.
◆ enc424j600SoftReset()
error_t enc424j600SoftReset | ( | NetInterface * | interface | ) |
Reset ENC424J600 controller.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 645 of file enc424j600_driver.c.
◆ enc424j600Tick()
void enc424j600Tick | ( | NetInterface * | interface | ) |
ENC424J600 timer handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 203 of file enc424j600_driver.c.
◆ enc424j600UpdateMacAddrFilter()
error_t enc424j600UpdateMacAddrFilter | ( | NetInterface * | interface | ) |
Configure MAC address filtering.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 550 of file enc424j600_driver.c.
◆ enc424j600UpdateMacConfig()
void enc424j600UpdateMacConfig | ( | NetInterface * | interface | ) |
Adjust MAC configuration parameters for proper operation.
- Parameters
-
[in] interface Underlying network interface
Definition at line 605 of file enc424j600_driver.c.
◆ enc424j600WriteBuffer()
void enc424j600WriteBuffer | ( | NetInterface * | interface, |
uint8_t | opcode, | ||
const NetBuffer * | buffer, | ||
size_t | offset | ||
) |
Write SRAM buffer.
- Parameters
-
[in] interface Underlying network interface [in] opcode SRAM buffer operation [in] buffer Multi-part buffer containing the data to be written [in] offset Offset to the first data byte
Definition at line 812 of file enc424j600_driver.c.
◆ enc424j600WritePhyReg()
void enc424j600WritePhyReg | ( | NetInterface * | interface, |
uint8_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 745 of file enc424j600_driver.c.
◆ enc424j600WriteReg()
void enc424j600WriteReg | ( | NetInterface * | interface, |
uint8_t | address, | ||
uint16_t | data | ||
) |
Write ENC424J600 register.
- Parameters
-
[in] interface Underlying network interface [in] address Register address [in] data Register value
Definition at line 688 of file enc424j600_driver.c.