DM9000A/B Ethernet controller. More...
#include "core/net.h"
#include "core/ethernet.h"
#include "drivers/eth/dm9000_driver.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL NIC_TRACE_LEVEL |
Functions | |
error_t | dm9000Init (NetInterface *interface) |
DM9000 controller initialization. More... | |
__weak_func void | dm9000InitHook (NetInterface *interface) |
DM9000 custom configuration. More... | |
void | dm9000Tick (NetInterface *interface) |
DM9000 timer handler. More... | |
void | dm9000EnableIrq (NetInterface *interface) |
Enable interrupts. More... | |
void | dm9000DisableIrq (NetInterface *interface) |
Disable interrupts. More... | |
bool_t | dm9000IrqHandler (NetInterface *interface) |
DM9000 interrupt service routine. More... | |
void | dm9000EventHandler (NetInterface *interface) |
DM9000 event handler. More... | |
error_t | dm9000SendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary) |
Send a packet. More... | |
error_t | dm9000ReceivePacket (NetInterface *interface) |
Receive a packet. More... | |
error_t | dm9000UpdateMacAddrFilter (NetInterface *interface) |
Configure MAC address filtering. More... | |
void | dm9000WriteReg (uint8_t address, uint8_t data) |
Write DM9000 register. More... | |
uint8_t | dm9000ReadReg (uint8_t address) |
Read DM9000 register. More... | |
void | dm9000WritePhyReg (uint8_t address, uint16_t data) |
Write DM9000 PHY register. More... | |
uint16_t | dm9000ReadPhyReg (uint8_t address) |
Read DM9000 PHY register. More... | |
uint32_t | dm9000CalcCrc (const void *data, size_t length) |
CRC calculation. More... | |
Variables | |
const NicDriver | dm9000Driver |
DM9000 driver. More... | |
Detailed Description
DM9000A/B 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 dm9000_driver.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL NIC_TRACE_LEVEL |
Definition at line 32 of file dm9000_driver.c.
Function Documentation
◆ dm9000CalcCrc()
uint32_t dm9000CalcCrc | ( | const void * | data, |
size_t | length | ||
) |
CRC calculation.
- 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 734 of file dm9000_driver.c.
◆ dm9000DisableIrq()
void dm9000DisableIrq | ( | NetInterface * | interface | ) |
Disable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 238 of file dm9000_driver.c.
◆ dm9000EnableIrq()
void dm9000EnableIrq | ( | NetInterface * | interface | ) |
Enable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 223 of file dm9000_driver.c.
◆ dm9000EventHandler()
void dm9000EventHandler | ( | NetInterface * | interface | ) |
DM9000 event handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 328 of file dm9000_driver.c.
◆ dm9000Init()
error_t dm9000Init | ( | NetInterface * | interface | ) |
DM9000 controller initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 72 of file dm9000_driver.c.
◆ dm9000InitHook()
__weak_func void dm9000InitHook | ( | NetInterface * | interface | ) |
DM9000 custom configuration.
- Parameters
-
[in] interface Underlying network interface
Definition at line 203 of file dm9000_driver.c.
◆ dm9000IrqHandler()
bool_t dm9000IrqHandler | ( | NetInterface * | interface | ) |
DM9000 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 254 of file dm9000_driver.c.
◆ dm9000ReadPhyReg()
uint16_t dm9000ReadPhyReg | ( | uint8_t | address | ) |
Read DM9000 PHY register.
- Parameters
-
[in] address PHY register address
- Returns
- Register value
Definition at line 704 of file dm9000_driver.c.
◆ dm9000ReadReg()
uint8_t dm9000ReadReg | ( | uint8_t | address | ) |
Read DM9000 register.
- Parameters
-
[in] address Register address
- Returns
- Register value
Definition at line 659 of file dm9000_driver.c.
◆ dm9000ReceivePacket()
error_t dm9000ReceivePacket | ( | NetInterface * | interface | ) |
Receive a packet.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 485 of file dm9000_driver.c.
◆ dm9000SendPacket()
error_t dm9000SendPacket | ( | 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 415 of file dm9000_driver.c.
◆ dm9000Tick()
void dm9000Tick | ( | NetInterface * | interface | ) |
DM9000 timer handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 213 of file dm9000_driver.c.
◆ dm9000UpdateMacAddrFilter()
error_t dm9000UpdateMacAddrFilter | ( | NetInterface * | interface | ) |
Configure MAC address filtering.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 584 of file dm9000_driver.c.
◆ dm9000WritePhyReg()
void dm9000WritePhyReg | ( | uint8_t | address, |
uint16_t | data | ||
) |
Write DM9000 PHY register.
- Parameters
-
[in] address PHY register address [in] data Register value
Definition at line 674 of file dm9000_driver.c.
◆ dm9000WriteReg()
void dm9000WriteReg | ( | uint8_t | address, |
uint8_t | data | ||
) |
Write DM9000 register.
- Parameters
-
[in] address Register address [in] data Register value
Definition at line 644 of file dm9000_driver.c.