This commit is contained in:
huxi
2025-12-03 11:12:34 +08:00
parent c23ae4f24c
commit bc195654bf
8163 changed files with 3799544 additions and 92 deletions
@@ -0,0 +1,27 @@
#ifndef CAMERA_QUEUE_BUF_H
#define CAMERA_QUEUE_BUF_H
#include "system/includes.h"
struct queue_buf {
u8 **buffer;
int buf_size;
int capacity;
volatile int head;
volatile int tail;
int abort;
};
struct queue_buf *queue_buf_create(int buf_size, int capacity);
void queue_buf_destroy(struct queue_buf *q);
u8 *queue_buf_get_isr(struct queue_buf *q);
void queue_buf_push_isr(struct queue_buf *q);
u8 *queue_buf_pop(struct queue_buf *q);
void queue_buf_release(struct queue_buf *q);
void queue_buf_reset(struct queue_buf *q);
#endif /* CAMERA_QUEUE_BUF_H */