1 2 /*------------------------------------------------------------------ 3 * 4 * Module: tq.h 5 * 6 * Purpose: Transmit queue - hold packets for transmission until the channel is clear. 7 * 8 *---------------------------------------------------------------*/ 9 10 #ifndef TQ_H 11 #define TQ_H 1 12 13 #include "ax25_pad.h" 14 #include "audio.h" 15 16 #define TQ_NUM_PRIO 2 /* Number of priorities. */ 17 18 #define TQ_PRIO_0_HI 0 19 #define TQ_PRIO_1_LO 1 20 21 22 23 void tq_init (struct audio_s *audio_config_p); 24 25 void tq_append (int chan, int prio, packet_t pp); 26 27 void lm_data_request (int chan, int prio, packet_t pp); 28 29 void lm_seize_request (int chan); 30 31 void tq_wait_while_empty (int chan); 32 33 packet_t tq_remove (int chan, int prio); 34 35 packet_t tq_peek (int chan, int prio); 36 37 int tq_count (int chan, int prio, char *source, char *dest, int bytes); 38 39 #endif 40 41 /* end tq.h */ 42