4 #include <lwip/netif.h>
7 #define ERR_ALLREAD -13
8 #define ERR_TXERROR -14
9 #define ERR_RXERROR -14
11 #define ERR_PKTSIZE -17
12 #define ERR_TXPENDING -18
14 #define cpu_to_be16(x) (x)
15 #define cpu_to_be32(x) (x)
16 extern inline u16
cpu_to_le16(u16 x
) { return (x
<<8) | (x
>>8);}
17 extern inline u32
cpu_to_le32(u32 x
) { return((x
>>24) | ((x
>>8)&0xff00) | ((x
<<8)&0xff0000) | (x
<<24));}
19 #define cpu_to_le16p(addr) (cpu_to_le16(*(addr)))
20 #define cpu_to_le32p(addr) (cpu_to_le32(*(addr)))
21 #define cpu_to_be16p(addr) (cpu_to_be16(*(addr)))
22 #define cpu_to_be32p(addr) (cpu_to_be32(*(addr)))
24 extern inline void cpu_to_le16s(u16
*a
) {*a
= cpu_to_le16(*a
);}
25 extern inline void cpu_to_le32s(u32
*a
) {*a
= cpu_to_le32(*a
);}
26 extern inline void cpu_to_be16s(u16
*a
) {*a
= cpu_to_be16(*a
);}
27 extern inline void cpu_to_be32s(u32
*a
) {*a
= cpu_to_be32(*a
);}
29 #define le16_to_cpup(x) cpu_to_le16p(x)
30 #define le32_to_cpup(x) cpu_to_le32p(x)
31 #define be16_to_cpup(x) cpu_to_be16p(x)
32 #define be32_to_cpup(x) cpu_to_be32p(x)
34 #define le16_to_cpus(x) cpu_to_le16s(x)
35 #define le32_to_cpus(x) cpu_to_le32s(x)
36 #define be16_to_cpus(x) cpu_to_be16s(x)
37 #define be32_to_cpus(x) cpu_to_be32s(x)
41 dev_s
bba_create(struct netif
*);
42 err_t
bba_init(struct netif
*);
43 void bba_process(struct pbuf
*p
,struct netif
*dev
);