summaryrefslogtreecommitdiff
path: root/tq.h
diff options
context:
space:
mode:
authorDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
committerDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
commit3cdcbeea3e2891f4a10c79b272da144f37ff24f3 (patch)
treedc2daaabc2ba68cc125fc21bd35f8e67bdb0499e /tq.h
parentf7fc865d93f8448779d320ce152f0fa44a64fcad (diff)
New upstream version 0.67upstream/0.67
Diffstat (limited to 'tq.h')
-rw-r--r--tq.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/tq.h b/tq.h
new file mode 100644
index 0000000..37599d5
--- /dev/null
+++ b/tq.h
@@ -0,0 +1,41 @@
+
+/*------------------------------------------------------------------
+ *
+ * Module: tq.h
+ *
+ * Purpose: Transmit queue - hold packets for transmission until the channel is clear.
+ *
+ *---------------------------------------------------------------*/
+
+#ifndef TQ_H
+#define TQ_H 1
+
+#include "ax25_pad.h"
+#include "audio.h"
+
+#define TQ_NUM_PRIO 2 /* Number of priorities. */
+
+#define TQ_PRIO_0_HI 0
+#define TQ_PRIO_1_LO 1
+
+
+
+void tq_init (struct audio_s *audio_config_p);
+
+void tq_append (int chan, int prio, packet_t pp);
+
+void lm_data_request (int chan, int prio, packet_t pp);
+
+void lm_seize_request (int chan);
+
+void tq_wait_while_empty (int chan);
+
+packet_t tq_remove (int chan, int prio);
+
+packet_t tq_peek (int chan, int prio);
+
+int tq_count (int chan, int prio, char *source, char *dest, int bytes);
+
+#endif
+
+/* end tq.h */