mikroSDK Reference Manual
lm3s_eth_driver.h
Go to the documentation of this file.
1
31#ifndef _LM3S_ETH_DRIVER_H
32#define _LM3S_ETH_DRIVER_H
33
34//Dependencies
35#include "core/nic.h"
36
37//Interrupt priority grouping
38#ifndef LM3S_ETH_IRQ_PRIORITY_GROUPING
39 #define LM3S_ETH_IRQ_PRIORITY_GROUPING 3
40#elif (LM3S_ETH_IRQ_PRIORITY_GROUPING < 0)
41 #error LM3S_ETH_IRQ_PRIORITY_GROUPING parameter is not valid
42#endif
43
44//Ethernet interrupt priority
45#ifndef LM3S_ETH_IRQ_PRIORITY
46 #define LM3S_ETH_IRQ_PRIORITY 192
47#elif (LM3S_ETH_IRQ_PRIORITY < 0)
48 #error LM3S_ETH_IRQ_PRIORITY parameter is not valid
49#endif
50
51//C++ guard
52#ifdef __cplusplus
53extern "C" {
54#endif
55
56//Stellaris LM3S Ethernet driver
57extern const NicDriver lm3sEthDriver;
58
59//Stellaris LM3S Ethernet related functions
60error_t lm3sEthInit(NetInterface *interface);
61void lm3sEthInitGpio(NetInterface *interface);
62
63void lm3sEthTick(NetInterface *interface);
64
65void lm3sEthEnableIrq(NetInterface *interface);
66void lm3sEthDisableIrq(NetInterface *interface);
67void lm3sEthEventHandler(NetInterface *interface);
68
69error_t lm3sEthSendPacket(NetInterface *interface,
70 const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary);
71
72error_t lm3sEthReceivePacket(NetInterface *interface);
73
74error_t lm3sEthUpdateMacAddrFilter(NetInterface *interface);
75
76void lm3sEthWritePhyReg(uint8_t address, uint16_t data);
77uint16_t lm3sEthReadPhyReg(uint8_t address);
78
79void lm3sEthDumpPhyReg(void);
80
81//C++ guard
82#ifdef __cplusplus
83}
84#endif
85
86#endif
error_t
Error codes.
Definition error.h:43
Network interface controller abstraction layer.
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89
NIC driver.
Definition nic.h:283