Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

dm9000.c File Reference

dm9000.c File Reference

DM9000A/B Ethernet controller. More...

Go to the source code of this file.

Functions

error_t dm9000Init (NetInterface *interface)
 DM9000 controller initialization.
void dm9000Tick (NetInterface *interface)
 DM9000 timer handler.
void dm9000EnableIrq (NetInterface *interface)
 Enable interrupts.
void dm9000DisableIrq (NetInterface *interface)
 Disable interrupts.
bool_t dm9000IrqHandler (NetInterface *interface)
 DM9000 interrupt service routine.
void dm9000EventHandler (NetInterface *interface)
 DM9000 event handler.
error_t dm9000SendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset)
 Send a packet to DM9000.
error_t dm9000ReceivePacket (NetInterface *interface)
 Receive a packet.
error_t dm9000SetMulticastFilter (NetInterface *interface)
 Configure multicast MAC address filtering.
void dm9000WriteReg (uint8_t address, uint8_t data)
 Write DM9000 register.
uint8_t dm9000ReadReg (uint8_t address)
 Read DM9000 register.
void dm9000WritePhyReg (uint8_t address, uint16_t data)
 Write DM9000 PHY register.
uint16_t dm9000ReadPhyReg (uint8_t address)
 Read DM9000 PHY register.
uint32_t dm9000CalcCrc (const void *data, size_t length)
 CRC calculation.

Variables

const NicDriver dm9000Driver
 DM9000 driver.

Detailed Description

DM9000A/B Ethernet 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 dm9000.c.


Function Documentation

uint32_t dm9000CalcCrc ( const void *  data,
size_t  length 
)

CRC calculation.

Parameters:
[in]dataPointer to the data over which to calculate the CRC
[in]lengthNumber of bytes to process
Returns:
Resulting CRC value

Definition at line 670 of file dm9000.c.

void dm9000DisableIrq ( NetInterface *  interface )

Disable interrupts.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 207 of file dm9000.c.

void dm9000EnableIrq ( NetInterface *  interface )

Enable interrupts.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 195 of file dm9000.c.

void dm9000EventHandler ( NetInterface *  interface )

DM9000 event handler.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 292 of file dm9000.c.

error_t dm9000Init ( NetInterface *  interface )

DM9000 controller initialization.

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

Definition at line 70 of file dm9000.c.

bool_t dm9000IrqHandler ( NetInterface *  interface )

DM9000 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 220 of file dm9000.c.

uint16_t dm9000ReadPhyReg ( uint8_t  address )

Read DM9000 PHY register.

Parameters:
[in]addressPHY register address
Returns:
Register value

Definition at line 643 of file dm9000.c.

uint8_t dm9000ReadReg ( uint8_t  address )

Read DM9000 register.

Parameters:
[in]addressRegister address
Returns:
Register value

Definition at line 602 of file dm9000.c.

error_t dm9000ReceivePacket ( NetInterface *  interface )

Receive a packet.

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

Definition at line 433 of file dm9000.c.

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

Send a packet to DM9000.

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 368 of file dm9000.c.

error_t dm9000SetMulticastFilter ( NetInterface *  interface )

Configure multicast MAC address filtering.

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

Definition at line 529 of file dm9000.c.

void dm9000Tick ( NetInterface *  interface )

DM9000 timer handler.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 185 of file dm9000.c.

void dm9000WritePhyReg ( uint8_t  address,
uint16_t  data 
)

Write DM9000 PHY register.

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

Definition at line 617 of file dm9000.c.

void dm9000WriteReg ( uint8_t  address,
uint8_t  data 
)

Write DM9000 register.

Parameters:
[in]addressRegister address
[in]dataRegister value

Definition at line 587 of file dm9000.c.


Variable Documentation

Initial value:

DM9000 driver.

Definition at line 43 of file dm9000.c.