RetroArch
btpbuf.h
Go to the documentation of this file.
1 #ifndef __BTPBUF_H__
2 #define __BTPBUF_H__
3 
4 #include "bt.h"
5 
6 /* Definitions for the pbuf flag field. These are NOT the flags that
7  * are passed to pbuf_alloc(). */
8 #define PBUF_FLAG_RAM 0x00U /* Flags that pbuf data is stored in RAM */
9 #define PBUF_FLAG_ROM 0x01U /* Flags that pbuf data is stored in ROM */
10 #define PBUF_FLAG_POOL 0x02U /* Flags that the pbuf comes from the pbuf pool */
11 #define PBUF_FLAG_REF 0x04U /* Flags thet the pbuf payload refers to RAM */
12 
13 typedef enum {
17 } pbuf_layer;
18 
19 typedef enum {
24 } pbuf_flag;
25 
26 struct pbuf {
27  struct pbuf *next;
28  void *payload;
29  u16_t tot_len;
30  u16_t len;
31  u16_t flags;
32  u16_t ref;
33 };
34 
35 void btpbuf_init();
37 u8_t btpbuf_free(struct pbuf *p);
38 void btpbuf_realloc(struct pbuf *p,u16_t new_len);
39 u8_t btpbuf_header(struct pbuf *p,s16_t hdr_size_inc);
40 void btpbuf_cat(struct pbuf *h,struct pbuf *t);
41 u8_t btpbuf_clen(struct pbuf *p);
42 void btpbuf_queue(struct pbuf *p,struct pbuf *n);
43 void btpbuf_ref(struct pbuf *p);
44 void btpbuf_chain(struct pbuf *h,struct pbuf *t);
45 struct pbuf* btpbuf_dequeue(struct pbuf *p);
46 struct pbuf* btpbuf_dechain(struct pbuf *p);
47 struct pbuf* btpbuf_take(struct pbuf *p);
48 
49 #endif
Definition: btpbuf.h:20
GLenum GLuint GLint GLint layer
Definition: glext.h:7674
pbuf_flag
Definition: pbuf.h:49
struct pbuf * btpbuf_dequeue(struct pbuf *p)
Definition: btpbuf.c:241
u16_t flags
Definition: pbuf.h:86
u8_t btpbuf_clen(struct pbuf *p)
Definition: btpbuf.c:195
void btpbuf_realloc(struct pbuf *p, u16_t new_len)
Definition: btpbuf.c:144
void btpbuf_ref(struct pbuf *p)
Definition: btpbuf.c:207
GLdouble GLdouble t
Definition: glext.h:6398
GLenum GLsizei len
Definition: glext.h:7389
void btpbuf_chain(struct pbuf *h, struct pbuf *t)
Definition: btpbuf.c:255
Definition: btpbuf.h:21
struct pbuf * btpbuf_alloc(pbuf_layer layer, u16_t len, pbuf_flag flag)
Definition: btpbuf.c:23
void btpbuf_cat(struct pbuf *h, struct pbuf *t)
Definition: btpbuf.c:218
Definition: btpbuf.h:23
Definition: btpbuf.h:22
pbuf_layer
Definition: btpbuf.h:13
u16_t len
Definition: pbuf.h:83
void * payload
Definition: pbuf.h:71
u16_t tot_len
Definition: pbuf.h:80
pbuf_flag
Definition: btpbuf.h:19
u8_t btpbuf_header(struct pbuf *p, s16_t hdr_size_inc)
Definition: btpbuf.c:171
Definition: btpbuf.h:14
Definition: btpbuf.h:15
u16_t ref
Definition: pbuf.h:93
GLfloat GLfloat p
Definition: glext.h:9809
s16 s16_t
Definition: cc.h:46
struct pbuf * btpbuf_dechain(struct pbuf *p)
Definition: btpbuf.c:261
struct pbuf * next
Definition: pbuf.h:68
u8 u8_t
Definition: cc.h:43
void btpbuf_init()
Definition: btpbuf.c:17
Definition: btpbuf.h:16
void btpbuf_queue(struct pbuf *p, struct pbuf *n)
Definition: btpbuf.c:231
u8_t btpbuf_free(struct pbuf *p)
Definition: btpbuf.c:112
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:8390
struct pbuf * btpbuf_take(struct pbuf *p)
Definition: btpbuf.c:278
GLdouble n
Definition: glext.h:8396
pbuf_layer
Definition: pbuf.h:42
u16 u16_t
Definition: cc.h:45
Definition: pbuf.h:66