summaryrefslogtreecommitdiff
path: root/yocto/esp32mod/msgq.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2026-01-08 01:01:17 +0100
committerUros Majstorovic <majstor@majstor.org>2026-01-08 01:01:17 +0100
commitf4c5fb24507080506741b8ac2c6b027b401d02c8 (patch)
treeca9ce3d7f5db62df2e7b3f2ffd7b65f8e35b98aa /yocto/esp32mod/msgq.h
parentb9a36b4bcc6ba144c8376172083e00bbdfa9ec78 (diff)
new esp32 tunnel driverHEADmaster
Diffstat (limited to 'yocto/esp32mod/msgq.h')
-rwxr-xr-xyocto/esp32mod/msgq.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/yocto/esp32mod/msgq.h b/yocto/esp32mod/msgq.h
new file mode 100755
index 0000000..f0d82f4
--- /dev/null
+++ b/yocto/esp32mod/msgq.h
@@ -0,0 +1,15 @@
+typedef struct MSGQueue {
+ uint16_t idx_r;
+ uint16_t idx_w;
+ uint16_t size;
+ unsigned char **array;
+ spinlock_t lock;
+ wait_queue_head_t wq;
+} MSGQueue;
+
+int msgq_create(MSGQueue *msgq, uint16_t size);
+void msgq_destroy(MSGQueue *msgq);
+uint16_t msgq_len(MSGQueue *msgq);
+uint16_t msgq_size(MSGQueue *msgq);
+int msgq_push(MSGQueue *msgq, unsigned char *buffer);
+unsigned char *msgq_pop(MSGQueue *msgq);