Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

am335x_eth.h File Reference

am335x_eth.h File Reference

Sitara AM335x Ethernet MAC controller. More...

Go to the source code of this file.

Data Structures

struct  Am335xAleEntry
 ALE table entry. More...
struct  _Am335xTxBufferDesc
 TX buffer descriptor. More...
struct  _Am335xRxBufferDesc
 RX buffer descriptor. More...

Typedefs

typedef struct _Am335xTxBufferDesc Am335xTxBufferDesc
 TX buffer descriptor.
typedef struct _Am335xRxBufferDesc Am335xRxBufferDesc
 RX buffer descriptor.

Functions

error_t am335xEthInitPort1 (NetInterface *interface)
 AM335x Ethernet MAC initialization (port 1)
error_t am335xEthInitPort2 (NetInterface *interface)
 AM335x Ethernet MAC initialization (port 2)
void am335xEthInitInstance (NetInterface *interface)
 Initialize CPSW instance.
void am335xEthInitGpio (NetInterface *interface)
 GPIO configuration.
void am335xEthInitBufferDesc (NetInterface *interface)
 Initialize buffer descriptor lists.
void am335xEthTick (NetInterface *interface)
 AM335x Ethernet MAC timer handler.
void am335xEthEnableIrq (NetInterface *interface)
 Enable interrupts.
void am335xEthDisableIrq (NetInterface *interface)
 Disable interrupts.
void am335xEthTxIrqHandler (void)
 Ethernet MAC transmit interrupt.
void am335xEthRxIrqHandler (void)
 Ethernet MAC receive interrupt.
void am335xEthEventHandler (NetInterface *interface)
 AM335x Ethernet MAC event handler.
error_t am335xEthSendPacketPort1 (NetInterface *interface, const NetBuffer *buffer, size_t offset)
 Send a packet (port 1)
error_t am335xEthSendPacketPort2 (NetInterface *interface, const NetBuffer *buffer, size_t offset)
 Send a packet (port 2)
error_t am335xEthSetMulticastFilter (NetInterface *interface)
 Configure multicast MAC address filtering.
error_t am335xEthUpdateMacConfig (NetInterface *interface)
 Adjust MAC configuration parameters for proper operation.
void am335xEthWritePhyReg (uint8_t phyAddr, uint8_t regAddr, uint16_t data)
 Write PHY register.
uint16_t am335xEthReadPhyReg (uint8_t phyAddr, uint8_t regAddr)
 Read PHY register.
void am335xEthWriteEntry (uint_t index, const Am335xAleEntry *entry)
 Write an ALE table entry.
void am335xEthReadEntry (uint_t index, Am335xAleEntry *entry)
 Read an ALE table entry.
uint_t am335xEthFindFreeEntry (void)
 Find a free entry in the ALE table.
uint_t am335xEthFindVlanEntry (uint_t vlanId)
 Search the ALE table for the specified VLAN entry.
uint_t am335xEthFindVlanAddrEntry (uint_t vlanId, MacAddr *macAddr)
 Search the ALE table for the specified VLAN/address entry.
error_t am335xEthAddVlanEntry (uint_t port, uint_t vlanId)
 Add a VLAN entry in the ALE table.
error_t am335xEthAddVlanAddrEntry (uint_t port, uint_t vlanId, MacAddr *macAddr)
 Add a VLAN/address entry in the ALE table.
error_t am335xEthDeleteVlanAddrEntry (uint_t port, uint_t vlanId, MacAddr *macAddr)
 Remove a VLAN/address entry from the ALE table.

Variables

const NicDriver am335xEthPort1Driver
 AM335x Ethernet MAC driver (port1)
const NicDriver am335xEthPort2Driver
 AM335x Ethernet MAC driver (port2)

Detailed Description

Sitara AM335x Ethernet MAC 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.

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

Definition in file am335x_eth.h.


Typedef Documentation

RX buffer descriptor.

TX buffer descriptor.


Function Documentation

error_t am335xEthAddVlanAddrEntry ( uint_t  port,
uint_t  vlanId,
MacAddr *  macAddr 
)

Add a VLAN/address entry in the ALE table.

Parameters:
[in]portPort number
[in]vlanIdVLAN identifier
[in]macAddrMAC address
Returns:
Error code

Definition at line 1650 of file am335x_eth.c.

error_t am335xEthAddVlanEntry ( uint_t  port,
uint_t  vlanId 
)

Add a VLAN entry in the ALE table.

Parameters:
[in]portPort number
[in]vlanIdVLAN identifier
Returns:
Error code

Definition at line 1590 of file am335x_eth.c.

error_t am335xEthDeleteVlanAddrEntry ( uint_t  port,
uint_t  vlanId,
MacAddr *  macAddr 
)

Remove a VLAN/address entry from the ALE table.

Parameters:
[in]portPort number
[in]vlanIdVLAN identifier
[in]macAddrMAC address
Returns:
Error code

Definition at line 1721 of file am335x_eth.c.

void am335xEthDisableIrq ( NetInterface *  interface )

Disable interrupts.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 818 of file am335x_eth.c.

void am335xEthEnableIrq ( NetInterface *  interface )

Enable interrupts.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 796 of file am335x_eth.c.

void am335xEthEventHandler ( NetInterface *  interface )

AM335x Ethernet MAC event handler.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 978 of file am335x_eth.c.

uint_t am335xEthFindFreeEntry ( void   )

Find a free entry in the ALE table.

Returns:
Index of the first free entry

Definition at line 1463 of file am335x_eth.c.

uint_t am335xEthFindVlanAddrEntry ( uint_t  vlanId,
MacAddr *  macAddr 
)

Search the ALE table for the specified VLAN/address entry.

Parameters:
[in]vlanIdVLAN identifier
[in]macAddrMAC address
Returns:
Index of the matching entry

Definition at line 1539 of file am335x_eth.c.

uint_t am335xEthFindVlanEntry ( uint_t  vlanId )

Search the ALE table for the specified VLAN entry.

Parameters:
[in]vlanIdVLAN identifier
Returns:
Index of the matching entry

Definition at line 1497 of file am335x_eth.c.

void am335xEthInitBufferDesc ( NetInterface *  interface )

Initialize buffer descriptor lists.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 666 of file am335x_eth.c.

void am335xEthInitGpio ( NetInterface *  interface )

GPIO configuration.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 487 of file am335x_eth.c.

void am335xEthInitInstance ( NetInterface *  interface )

Initialize CPSW instance.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 320 of file am335x_eth.c.

error_t am335xEthInitPort1 ( NetInterface *  interface )

AM335x Ethernet MAC initialization (port 1)

Parameters:
[in]interfaceUnderlying network interface
Returns:
Error code

Definition at line 175 of file am335x_eth.c.

error_t am335xEthInitPort2 ( NetInterface *  interface )

AM335x Ethernet MAC initialization (port 2)

Parameters:
[in]interfaceUnderlying network interface
Returns:
Error code

Definition at line 248 of file am335x_eth.c.

void am335xEthReadEntry ( uint_t  index,
Am335xAleEntry entry 
)

Read an ALE table entry.

Parameters:
[in]indexEntry index
[out]entryPointer to the ALE table entry

Definition at line 1446 of file am335x_eth.c.

uint16_t am335xEthReadPhyReg ( uint8_t  phyAddr,
uint8_t  regAddr 
)

Read PHY register.

Parameters:
[in]phyAddrPHY address
[in]regAddrRegister address
Returns:
Register value

Definition at line 1401 of file am335x_eth.c.

void am335xEthRxIrqHandler ( void   )

Ethernet MAC receive interrupt.

Definition at line 935 of file am335x_eth.c.

error_t am335xEthSendPacketPort1 ( NetInterface *  interface,
const NetBuffer buffer,
size_t  offset 
)

Send a packet (port 1)

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 1105 of file am335x_eth.c.

error_t am335xEthSendPacketPort2 ( NetInterface *  interface,
const NetBuffer buffer,
size_t  offset 
)

Send a packet (port 2)

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 1188 of file am335x_eth.c.

error_t am335xEthSetMulticastFilter ( NetInterface *  interface )

Configure multicast MAC address filtering.

Parameters:
[in]interfaceUnderlying network interface
Returns:
Error code

Definition at line 1269 of file am335x_eth.c.

void am335xEthTick ( NetInterface *  interface )

AM335x Ethernet MAC 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 772 of file am335x_eth.c.

void am335xEthTxIrqHandler ( void   )

Ethernet MAC transmit interrupt.

Definition at line 839 of file am335x_eth.c.

error_t am335xEthUpdateMacConfig ( NetInterface *  interface )

Adjust MAC configuration parameters for proper operation.

Parameters:
[in]interfaceUnderlying network interface
Returns:
Error code

Definition at line 1321 of file am335x_eth.c.

void am335xEthWriteEntry ( uint_t  index,
const Am335xAleEntry entry 
)

Write an ALE table entry.

Parameters:
[in]indexEntry index
[in]entryPointer to the ALE table entry

Definition at line 1428 of file am335x_eth.c.

void am335xEthWritePhyReg ( uint8_t  phyAddr,
uint8_t  regAddr,
uint16_t  data 
)

Write PHY register.

Parameters:
[in]phyAddrPHY address
[in]regAddrRegister address
[in]dataRegister value

Definition at line 1374 of file am335x_eth.c.


Variable Documentation

AM335x Ethernet MAC driver (port1)

Definition at line 123 of file am335x_eth.c.

AM335x Ethernet MAC driver (port2)

Definition at line 148 of file am335x_eth.c.