lm3s_eth_driver.c File Reference

Luminary Stellaris LM3S Ethernet controller. More...

#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/sysctl.h"
#include "core/net.h"
#include "drivers/mac/lm3s_eth_driver.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   NIC_TRACE_LEVEL
 

Functions

error_t lm3sEthInit (NetInterface *interface)
 Stellaris LM3S Ethernet controller initialization. More...
 
void lm3sEthTick (NetInterface *interface)
 Stellaris LM3S Ethernet timer handler. More...
 
void lm3sEthEnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void lm3sEthDisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void ETH_IRQHandler (void)
 Stellaris LM3S Ethernet interrupt service routine. More...
 
void lm3sEthEventHandler (NetInterface *interface)
 Stellaris LM3S Ethernet event handler. More...
 
error_t lm3sEthSendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset)
 Send a packet. More...
 
error_t lm3sEthReceivePacket (NetInterface *interface)
 Receive a packet. More...
 
error_t lm3sEthUpdateMacAddrFilter (NetInterface *interface)
 Configure MAC address filtering. More...
 
void lm3sEthWritePhyReg (uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t lm3sEthReadPhyReg (uint8_t address)
 Read PHY register. More...
 
void lm3sEthDumpPhyReg (void)
 Dump PHY registers for debugging purpose. More...
 

Variables

const NicDriver lm3sEthDriver
 Stellaris LM3S Ethernet driver. More...
 

Detailed Description

Luminary Stellaris LM3S Ethernet controller.

License

Copyright (C) 2010-2018 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
1.9.0

Definition in file lm3s_eth_driver.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   NIC_TRACE_LEVEL

Definition at line 30 of file lm3s_eth_driver.c.

Function Documentation

◆ ETH_IRQHandler()

void ETH_IRQHandler ( void  )

Stellaris LM3S Ethernet interrupt service routine.

Definition at line 234 of file lm3s_eth_driver.c.

◆ lm3sEthDisableIrq()

void lm3sEthDisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 223 of file lm3s_eth_driver.c.

◆ lm3sEthDumpPhyReg()

void lm3sEthDumpPhyReg ( void  )

Dump PHY registers for debugging purpose.

Definition at line 610 of file lm3s_eth_driver.c.

◆ lm3sEthEnableIrq()

void lm3sEthEnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 211 of file lm3s_eth_driver.c.

◆ lm3sEthEventHandler()

void lm3sEthEventHandler ( NetInterface interface)

Stellaris LM3S Ethernet event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 296 of file lm3s_eth_driver.c.

◆ lm3sEthInit()

error_t lm3sEthInit ( NetInterface interface)

Stellaris LM3S Ethernet controller initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 106 of file lm3s_eth_driver.c.

◆ lm3sEthReadPhyReg()

uint16_t lm3sEthReadPhyReg ( uint8_t  address)

Read PHY register.

Parameters
[in]addressPHY register address
Returns
Register value

Definition at line 593 of file lm3s_eth_driver.c.

◆ lm3sEthReceivePacket()

error_t lm3sEthReceivePacket ( NetInterface interface)

Receive a packet.

Returns
Error code

Definition at line 445 of file lm3s_eth_driver.c.

◆ lm3sEthSendPacket()

error_t lm3sEthSendPacket ( NetInterface interface,
const NetBuffer buffer,
size_t  offset 
)

Send a packet.

Parameters
[in]interfaceUnderlying network interface
[in]bufferMulti-part buffer containing the data to send
[in]offsetOffset to the first data byte
Returns
Error code

Definition at line 393 of file lm3s_eth_driver.c.

◆ lm3sEthTick()

void lm3sEthTick ( NetInterface interface)

Stellaris LM3S Ethernet timer handler.

This routine is periodically called by the TCP/IP stack to handle periodic operations such as polling the link state

Parameters
[in]interfaceUnderlying network interface

Definition at line 201 of file lm3s_eth_driver.c.

◆ lm3sEthUpdateMacAddrFilter()

error_t lm3sEthUpdateMacAddrFilter ( NetInterface interface)

Configure MAC address filtering.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 536 of file lm3s_eth_driver.c.

◆ lm3sEthWritePhyReg()

void lm3sEthWritePhyReg ( uint8_t  address,
uint16_t  data 
)

Write PHY register.

Parameters
[in]addressPHY register address
[in]dataRegister value

Definition at line 575 of file lm3s_eth_driver.c.

Variable Documentation

◆ lm3sEthDriver

const NicDriver lm3sEthDriver
Initial value:
=
{
NULL,
NULL,
NULL,
}
void lm3sEthTick(NetInterface *interface)
Stellaris LM3S Ethernet timer handler.
#define TRUE
Definition: os_port.h:48
void lm3sEthEnableIrq(NetInterface *interface)
Enable interrupts.
#define ETH_MTU
Definition: ethernet.h:82
Ethernet interface.
Definition: nic.h:69
error_t lm3sEthUpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
error_t lm3sEthInit(NetInterface *interface)
Stellaris LM3S Ethernet controller initialization.
void lm3sEthEventHandler(NetInterface *interface)
Stellaris LM3S Ethernet event handler.
#define FALSE
Definition: os_port.h:44
error_t lm3sEthSendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset)
Send a packet.
void lm3sEthDisableIrq(NetInterface *interface)
Disable interrupts.

Stellaris LM3S Ethernet driver.

Definition at line 79 of file lm3s_eth_driver.c.