RetroArch
gcif.h
Go to the documentation of this file.
1 #ifndef __GCIF_H__
2 #define __GCIF_H__
3 
4 #include <lwip/netif.h>
5 
6 #define ERR_NODATA -12
7 #define ERR_ALLREAD -13
8 #define ERR_TXERROR -14
9 #define ERR_RXERROR -14
10 #define ERR_NODEV -16
11 #define ERR_PKTSIZE -17
12 #define ERR_TXPENDING -18
13 
14 #define cpu_to_be16(x) (x)
15 #define cpu_to_be32(x) (x)
16 static inline u16 cpu_to_le16(u16 x) { return (x<<8) | (x>>8);}
17 static inline u32 cpu_to_le32(u32 x) { return((x>>24) | ((x>>8)&0xff00) | ((x<<8)&0xff0000) | (x<<24));}
18 
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)))
23 
24 static inline void cpu_to_le16s(u16 *a) {*a = cpu_to_le16(*a);}
25 static inline void cpu_to_le32s(u32 *a) {*a = cpu_to_le32(*a);}
26 static inline void cpu_to_be16s(u16 *a) {*a = cpu_to_be16(*a);}
27 static inline void cpu_to_be32s(u32 *a) {*a = cpu_to_be32(*a);}
28 
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)
33 
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)
38 
39 typedef void* dev_s;
40 
41 dev_s bba_create(struct netif *);
42 err_t bba_init(struct netif *);
43 void bba_process(struct pbuf *p,struct netif *dev);
44 
45 #endif
s8_t err_t
Definition: err.h:39
dev_s bba_create(struct netif *)
Definition: gcif.c:1013
#define cpu_to_be32(x)
Definition: gcif.h:15
Definition: netif.h:72
static void cpu_to_be32s(u32 *a)
Definition: gcif.h:27
static void cpu_to_be16s(u16 *a)
Definition: gcif.h:26
err_t bba_init(struct netif *)
Definition: gcif.c:983
uint16_t u16
16bit unsigned integer
Definition: gctypes.h:18
void * dev_s
Definition: gcif.h:39
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
GLfloat GLfloat p
Definition: glext.h:9809
void bba_process(struct pbuf *p, struct netif *dev)
Definition: gcif.c:613
static u32 cpu_to_le32(u32 x)
Definition: gcif.h:17
static u16 cpu_to_le16(u16 x)
Definition: gcif.h:16
static void cpu_to_le32s(u32 *a)
Definition: gcif.h:25
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
static void cpu_to_le16s(u16 *a)
Definition: gcif.h:24
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
#define cpu_to_be16(x)
Definition: gcif.h:14
Definition: pbuf.h:66