xref: /haiku/headers/os/drivers/USB_rle.h (revision 2222d0559df303a9846a2fad53741f8b20b14d7c)
1 /*
2  * Copyright 2009, Haiku Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _USB_RLE_H
6 #define _USB_RLE_H
7 
8 
9 #include <SupportDefs.h>
10 
11 
12 struct _usbd_param_hdr;
13 
14 
15 /* Run length encoding for isochronous in transfers */
16 
17 #define RLE_GOOD       1
18 #define RLE_BAD        2
19 #define RLE_MISSING    3
20 #define RLE_UNKNOWN    4
21 
22 /* data buffer state */
23 typedef struct rle {
24 	uint16	rle_status;
25 	uint16	sample_count;
26 } rle;
27 
28 typedef struct rlea {
29 	uint16	length;
30 	uint16	num_valid;
31 	rle		rles[1];
32 } rlea;
33 
34 
35 #endif	/* _USB_RLE_H */
36