FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/com/include/cl_ribu.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : COMLIB | |
4 | Modul : cl_ribu | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : Definitions of global types used by common library functions | |
18 | and the prototypes of those functions. | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 /* | |
22 * Version 1.0 | |
23 */ | |
24 | |
25 /**********************************************************************************/ | |
26 | |
27 #ifndef CL_RIBU_H | |
28 #define CL_RIBU_H | |
29 | |
30 /**********************************************************************************/ | |
31 | |
32 typedef struct | |
33 { | |
34 U8 ri; /* ring buffer read index */ | |
35 U8 wi; /* ring buffer write index */ | |
36 U8 depth; /* ring buffer depth */ | |
37 U8 filled; /* ring buffer filled flag */ | |
38 } T_RIBU; | |
39 | |
40 typedef struct | |
41 { | |
42 U8 type; | |
43 U8 status; | |
44 U8 len; /* buffer length */ | |
45 U8 *buf; /* buffer start address */ | |
46 } T_FD; /* frame descriptor */ | |
47 | |
48 typedef struct | |
49 { | |
50 T_RIBU idx; | |
51 T_FD **pFDv; /* frame descriptor vector */ | |
52 } T_RIBU_FD; | |
53 | |
54 /**********************************************************************************/ | |
55 | |
56 EXTERN void cl_ribu_create(T_RIBU_FD **ribu, const U8 buflen, const U8 depth); | |
57 EXTERN void cl_ribu_release(T_RIBU_FD **ribu); | |
58 | |
59 EXTERN void cl_ribu_put(const T_FD fd, T_RIBU_FD *ribu); | |
60 EXTERN T_FD *cl_ribu_get(T_RIBU_FD *ribu); | |
61 EXTERN T_FD *cl_ribu_get_new_frame_desc(T_RIBU_FD *ribu); | |
62 | |
63 EXTERN void cl_ribu_init(T_RIBU *ribu, const U8 depth); | |
64 EXTERN U8 cl_ribu_read_index(T_RIBU *ribu); | |
65 EXTERN U8 cl_ribu_write_index(T_RIBU *ribu); | |
66 EXTERN BOOL cl_ribu_data_avail(const T_RIBU_FD *ribu); | |
67 | |
68 EXTERN void cl_set_frame_desc(T_FRAME_DESC *frame_desc, U8 *A0, U16 L0, U8 *A1, U16 L1); | |
69 EXTERN void cl_set_frame_desc_0(T_FRAME_DESC *frame_desc, U8 *A0, U16 L0); | |
70 | |
71 #endif /* CL_RIBU_H */ |