Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_queue.h
1 #ifndef _BC_QUEUE_H
2 #define _BC_QUEUE_H
3 
4 #include <bc_common.h>
5 
9 
11 
12 typedef struct
13 {
14  void *_buffer;
15  size_t _size;
16  size_t _length;
17 
18 } bc_queue_t;
19 
21 
26 
27 void bc_queue_init(bc_queue_t *queue, void *buffer, size_t size);
28 
35 
36 bool bc_queue_put(bc_queue_t *queue, const void *buffer, size_t length);
37 
44 
45 bool bc_queue_get(bc_queue_t *queue, void *buffer, size_t *length);
46 
48 
49 #endif // _BC_QUEUE_H
bool bc_queue_get(bc_queue_t *queue, void *buffer, size_t *length)
Get queue to buffer.
Definition: bc_queue.c:45
void bc_queue_init(bc_queue_t *queue, void *buffer, size_t size)
Initialize queue.
Definition: bc_queue.c:3
bool bc_queue_put(bc_queue_t *queue, const void *buffer, size_t length)
Put buffer to queue.
Definition: bc_queue.c:11