summaryrefslogtreecommitdiff
path: root/tq.h
blob: 37599d592704f0dbd43967153c2ad109fea0e2c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 */