Webserver+3d print
cyclone_tcp/drivers/lm3s_eth.h@0:8918a71cdbe9, 2017-02-04 (annotated)
- Committer:
- Sergunb
- Date:
- Sat Feb 04 18:15:49 2017 +0000
- Revision:
- 0:8918a71cdbe9
nothing else
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sergunb | 0:8918a71cdbe9 | 1 | /** |
Sergunb | 0:8918a71cdbe9 | 2 | * @file lm3s_eth.h |
Sergunb | 0:8918a71cdbe9 | 3 | * @brief Luminary Stellaris LM3S Ethernet controller |
Sergunb | 0:8918a71cdbe9 | 4 | * |
Sergunb | 0:8918a71cdbe9 | 5 | * @section License |
Sergunb | 0:8918a71cdbe9 | 6 | * |
Sergunb | 0:8918a71cdbe9 | 7 | * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved. |
Sergunb | 0:8918a71cdbe9 | 8 | * |
Sergunb | 0:8918a71cdbe9 | 9 | * This file is part of CycloneTCP Open. |
Sergunb | 0:8918a71cdbe9 | 10 | * |
Sergunb | 0:8918a71cdbe9 | 11 | * This program is free software; you can redistribute it and/or |
Sergunb | 0:8918a71cdbe9 | 12 | * modify it under the terms of the GNU General Public License |
Sergunb | 0:8918a71cdbe9 | 13 | * as published by the Free Software Foundation; either version 2 |
Sergunb | 0:8918a71cdbe9 | 14 | * of the License, or (at your option) any later version. |
Sergunb | 0:8918a71cdbe9 | 15 | * |
Sergunb | 0:8918a71cdbe9 | 16 | * This program is distributed in the hope that it will be useful, |
Sergunb | 0:8918a71cdbe9 | 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
Sergunb | 0:8918a71cdbe9 | 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
Sergunb | 0:8918a71cdbe9 | 19 | * GNU General Public License for more details. |
Sergunb | 0:8918a71cdbe9 | 20 | * |
Sergunb | 0:8918a71cdbe9 | 21 | * You should have received a copy of the GNU General Public License |
Sergunb | 0:8918a71cdbe9 | 22 | * along with this program; if not, write to the Free Software Foundation, |
Sergunb | 0:8918a71cdbe9 | 23 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
Sergunb | 0:8918a71cdbe9 | 24 | * |
Sergunb | 0:8918a71cdbe9 | 25 | * @author Oryx Embedded SARL (www.oryx-embedded.com) |
Sergunb | 0:8918a71cdbe9 | 26 | * @version 1.7.6 |
Sergunb | 0:8918a71cdbe9 | 27 | **/ |
Sergunb | 0:8918a71cdbe9 | 28 | |
Sergunb | 0:8918a71cdbe9 | 29 | #ifndef _LM3S_ETH_H |
Sergunb | 0:8918a71cdbe9 | 30 | #define _LM3S_ETH_H |
Sergunb | 0:8918a71cdbe9 | 31 | |
Sergunb | 0:8918a71cdbe9 | 32 | //Dependencies |
Sergunb | 0:8918a71cdbe9 | 33 | #include "core/nic.h" |
Sergunb | 0:8918a71cdbe9 | 34 | |
Sergunb | 0:8918a71cdbe9 | 35 | //Interrupt priority grouping |
Sergunb | 0:8918a71cdbe9 | 36 | #ifndef LM3S_ETH_IRQ_PRIORITY_GROUPING |
Sergunb | 0:8918a71cdbe9 | 37 | #define LM3S_ETH_IRQ_PRIORITY_GROUPING 3 |
Sergunb | 0:8918a71cdbe9 | 38 | #elif (LM3S_ETH_IRQ_PRIORITY_GROUPING < 0) |
Sergunb | 0:8918a71cdbe9 | 39 | #error LM3S_ETH_IRQ_PRIORITY_GROUPING parameter is not valid |
Sergunb | 0:8918a71cdbe9 | 40 | #endif |
Sergunb | 0:8918a71cdbe9 | 41 | |
Sergunb | 0:8918a71cdbe9 | 42 | //Ethernet interrupt priority |
Sergunb | 0:8918a71cdbe9 | 43 | #ifndef LM3S_ETH_IRQ_PRIORITY |
Sergunb | 0:8918a71cdbe9 | 44 | #define LM3S_ETH_IRQ_PRIORITY 192 |
Sergunb | 0:8918a71cdbe9 | 45 | #elif (LM3S_ETH_IRQ_PRIORITY < 0) |
Sergunb | 0:8918a71cdbe9 | 46 | #error LM3S_ETH_IRQ_PRIORITY parameter is not valid |
Sergunb | 0:8918a71cdbe9 | 47 | #endif |
Sergunb | 0:8918a71cdbe9 | 48 | |
Sergunb | 0:8918a71cdbe9 | 49 | //Stellaris LM3S Ethernet driver |
Sergunb | 0:8918a71cdbe9 | 50 | extern const NicDriver lm3sEthDriver; |
Sergunb | 0:8918a71cdbe9 | 51 | |
Sergunb | 0:8918a71cdbe9 | 52 | //Stellaris LM3S Ethernet related functions |
Sergunb | 0:8918a71cdbe9 | 53 | error_t lm3sEthInit(NetInterface *interface); |
Sergunb | 0:8918a71cdbe9 | 54 | void lm3sEthInitGpio(NetInterface *interface); |
Sergunb | 0:8918a71cdbe9 | 55 | |
Sergunb | 0:8918a71cdbe9 | 56 | void lm3sEthTick(NetInterface *interface); |
Sergunb | 0:8918a71cdbe9 | 57 | |
Sergunb | 0:8918a71cdbe9 | 58 | void lm3sEthEnableIrq(NetInterface *interface); |
Sergunb | 0:8918a71cdbe9 | 59 | void lm3sEthDisableIrq(NetInterface *interface); |
Sergunb | 0:8918a71cdbe9 | 60 | void lm3sEthEventHandler(NetInterface *interface); |
Sergunb | 0:8918a71cdbe9 | 61 | |
Sergunb | 0:8918a71cdbe9 | 62 | error_t lm3sEthSendPacket(NetInterface *interface, |
Sergunb | 0:8918a71cdbe9 | 63 | const NetBuffer *buffer, size_t offset); |
Sergunb | 0:8918a71cdbe9 | 64 | |
Sergunb | 0:8918a71cdbe9 | 65 | error_t lm3sEthReceivePacket(NetInterface *interface); |
Sergunb | 0:8918a71cdbe9 | 66 | |
Sergunb | 0:8918a71cdbe9 | 67 | error_t lm3sEthSetMulticastFilter(NetInterface *interface); |
Sergunb | 0:8918a71cdbe9 | 68 | |
Sergunb | 0:8918a71cdbe9 | 69 | void lm3sEthWritePhyReg(uint8_t address, uint16_t data); |
Sergunb | 0:8918a71cdbe9 | 70 | uint16_t lm3sEthReadPhyReg(uint8_t address); |
Sergunb | 0:8918a71cdbe9 | 71 | |
Sergunb | 0:8918a71cdbe9 | 72 | void lm3sEthDumpPhyReg(void); |
Sergunb | 0:8918a71cdbe9 | 73 | |
Sergunb | 0:8918a71cdbe9 | 74 | #endif |
Sergunb | 0:8918a71cdbe9 | 75 |