ncv7410_driver.c File Reference

Onsemi NCV7410 10Base-T1S Ethernet controller. More...

#include "core/net.h"
#include "drivers/eth/ncv7410_driver.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   NIC_TRACE_LEVEL
 

Functions

error_t ncv7410Init (NetInterface *interface)
 NCV7410 controller initialization. More...
 
__weak_func void ncv7410InitHook (NetInterface *interface)
 NCV7410 custom configuration. More...
 
void ncv7410Tick (NetInterface *interface)
 NCV7410 timer handler. More...
 
void ncv7410EnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void ncv7410DisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
bool_t ncv7410IrqHandler (NetInterface *interface)
 NCV7410 interrupt service routine. More...
 
void ncv7410EventHandler (NetInterface *interface)
 NCV7410 event handler. More...
 
error_t ncv7410SendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
 Send a packet. More...
 
error_t ncv7410ReceivePacket (NetInterface *interface)
 Receive a packet. More...
 
error_t ncv7410UpdateMacAddrFilter (NetInterface *interface)
 Configure MAC address filtering. More...
 
void ncv7410WriteReg (NetInterface *interface, uint8_t mms, uint16_t address, uint32_t data)
 Write register. More...
 
uint32_t ncv7410ReadReg (NetInterface *interface, uint8_t mms, uint16_t address)
 Read register. More...
 
void ncv7410DumpReg (NetInterface *interface, uint8_t mms, uint16_t address, uint_t num)
 Dump registers for debugging purpose. More...
 
uint32_t ncv7410CalcParity (uint32_t data)
 Calculate parity bit over a 32-bit data. More...
 

Variables

const NicDriver ncv7410Driver
 NCV7410 driver. More...
 

Detailed Description

Onsemi NCV7410 10Base-T1S Ethernet controller.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2025 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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.5.2

Definition in file ncv7410_driver.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   NIC_TRACE_LEVEL

Definition at line 32 of file ncv7410_driver.c.

Function Documentation

◆ ncv7410CalcParity()

uint32_t ncv7410CalcParity ( uint32_t  data)

Calculate parity bit over a 32-bit data.

Parameters
[in]data32-bit bit stream
Returns
Odd parity bit computed over the supplied data

Definition at line 871 of file ncv7410_driver.c.

◆ ncv7410DisableIrq()

void ncv7410DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 280 of file ncv7410_driver.c.

◆ ncv7410DumpReg()

void ncv7410DumpReg ( NetInterface interface,
uint8_t  mms,
uint16_t  address,
uint_t  num 
)

Dump registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface
[in]mmsRegister memory map to access
[in]addressStart address
[in]numNumber of registers to dump

Definition at line 847 of file ncv7410_driver.c.

◆ ncv7410EnableIrq()

void ncv7410EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 265 of file ncv7410_driver.c.

◆ ncv7410EventHandler()

void ncv7410EventHandler ( NetInterface interface)

NCV7410 event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 312 of file ncv7410_driver.c.

◆ ncv7410Init()

error_t ncv7410Init ( NetInterface interface)

NCV7410 controller initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 71 of file ncv7410_driver.c.

◆ ncv7410InitHook()

__weak_func void ncv7410InitHook ( NetInterface interface)

NCV7410 custom configuration.

Parameters
[in]interfaceUnderlying network interface

Definition at line 199 of file ncv7410_driver.c.

◆ ncv7410IrqHandler()

bool_t ncv7410IrqHandler ( NetInterface interface)

NCV7410 interrupt service routine.

Parameters
[in]interfaceUnderlying network interface
Returns
TRUE if a higher priority task must be woken. Else FALSE is returned

Definition at line 296 of file ncv7410_driver.c.

◆ ncv7410ReadReg()

uint32_t ncv7410ReadReg ( NetInterface interface,
uint8_t  mms,
uint16_t  address 
)

Read register.

Parameters
[in]interfaceUnderlying network interface
[in]mmsRegister memory map to access
[in]addressRegister address
Returns
Register value

Definition at line 789 of file ncv7410_driver.c.

◆ ncv7410ReceivePacket()

error_t ncv7410ReceivePacket ( NetInterface interface)

Receive a packet.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 460 of file ncv7410_driver.c.

◆ ncv7410SendPacket()

error_t ncv7410SendPacket ( NetInterface interface,
const NetBuffer buffer,
size_t  offset,
NetTxAncillary ancillary 
)

Send a packet.

Parameters
[in]interfaceUnderlying network interface
[in]bufferMulti-part buffer containing the data to send
[in]offsetOffset to the first data byte
[in]ancillaryAdditional options passed to the stack along with the packet
Returns
Error code

Definition at line 341 of file ncv7410_driver.c.

◆ ncv7410Tick()

void ncv7410Tick ( NetInterface interface)

NCV7410 timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 225 of file ncv7410_driver.c.

◆ ncv7410UpdateMacAddrFilter()

error_t ncv7410UpdateMacAddrFilter ( NetInterface interface)

Configure MAC address filtering.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 588 of file ncv7410_driver.c.

◆ ncv7410WriteReg()

void ncv7410WriteReg ( NetInterface interface,
uint8_t  mms,
uint16_t  address,
uint32_t  data 
)

Write register.

Parameters
[in]interfaceUnderlying network interface
[in]mmsRegister memory map to access
[in]addressRegister address
[in]dataRegister value

Definition at line 735 of file ncv7410_driver.c.

Variable Documentation

◆ ncv7410Driver

const NicDriver ncv7410Driver
void ncv7410Tick(NetInterface *interface)
NCV7410 timer handler.
void ncv7410DisableIrq(NetInterface *interface)
Disable interrupts.
#define TRUE
Definition: os_port.h:50
error_t ncv7410SendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet.
#define FALSE
Definition: os_port.h:46
error_t ncv7410Init(NetInterface *interface)
NCV7410 controller initialization.
error_t ncv7410UpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
void ncv7410EventHandler(NetInterface *interface)
NCV7410 event handler.
#define ETH_MTU
Definition: ethernet.h:116
void ncv7410EnableIrq(NetInterface *interface)
Enable interrupts.
@ NIC_TYPE_ETHERNET
Ethernet interface.
Definition: nic.h:83