RTEMS 6.1-rc1
fec.h
1#ifndef FEC_H
2#define FEC_H
3
4#include <arch/sys_arch.h>
5#include <lwip/netif.h>
6#include <stdbool.h>
7
8struct if_config {
9 u8_t flags;
10 u8_t hwaddr_len;
11 u16_t mtu;
12 u8_t hwaddr[NETIF_MAX_HWADDR_LEN];
13 sys_thread_t net_task;
14 void(*phy_init)(void);
15 u8_t name[2];
16};
17
18extern err_t mcf5225xif_init(struct netif *);
19extern void handle_rx_frame(struct netif*);
20
21extern void smi_init(u32_t);
22extern void smi_write(u8_t,u8_t,u16_t);
23extern u16_t smi_read(u8_t,u8_t);
24
25#define MAX_FRAME_LEN 1518
26#define MTU_SIZE (MAX_FRAME_LEN-18)
27#define MSCR_MII_SPEED(clk) ((clk/5000000+1)<<1)
28#define PHY_ADDR 1
29#define PHY_REG_ID1 2
30#define PHY_REG_ID2 3
31
32#endif /* FEC_H */
Definition: fec.h:8