comparison src/g23m-aci/gdd_dio/gdd_dio_data.h @ 162:53929b40109c

src/g23m-aci: initial import from TCS3.2/LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 11 Oct 2016 02:02:43 +0000
parents
children
comparison
equal deleted inserted replaced
161:4557e2a9c18e 162:53929b40109c
1 /*
2 +------------------------------------------------------------------------------
3 | File: gdd_dio_data.h
4 +------------------------------------------------------------------------------
5 | Copyright 2002 Texas Instruments Berlin, AG
6 | All rights reserved.
7 |
8 | This file is confidential and a trade secret of Texas
9 | Instruments Berlin, AG
10 | The receipt of or possession of this file does not convey
11 | any rights to reproduce or disclose its contents or to
12 | manufacture, use, or sell anything it may describe, in
13 | whole, or in part, without the specific written consent of
14 | Texas Instruments Berlin, AG.
15 +-----------------------------------------------------------------------------
16 | Purpose : Internal data structures for entity gdd_dio (DIO BAT Adapter)
17 +-----------------------------------------------------------------------------
18 */
19
20 #ifndef GDD_DIO_DATA_H
21 #define GDD_DIO_DATA_H
22
23 /*==== INCLUDES =============================================================*/
24
25 /* DIO stuff */
26 #include "dio.h" /* for T_DIO_CAP_PKT */
27
28 /* We must define P_DIO_H, in order to avoid inclusion of p_dio.h.
29 This is necessary due to the special fact, that "dio.h", which is included
30 in the header "dio_io/dio_drv.h", mirrors the header "p_dio.h". */
31 #define P_DIO_H
32
33 #include "gdd.h"
34
35 #include "gdd_dio_queue.h" /* for T_GDD_BUF_QUEUE */
36
37
38 /*==== DEFINITIONS ==========================================================*/
39
40 #define GDD_CON_HANDLE_USER_MASK 0xFF000000
41
42
43 /*==== CONSTS ===============================================================*/
44
45 /*==== TYPES =================================================================*/
46
47 /**
48 * States of kernel service
49 */
50 typedef enum
51 {
52 GDD_DIO_KER_DEAD = 0,
53 GDD_DIO_KER_INIT,
54 GDD_DIO_KER_READY
55 } T_GDD_DIO_KER_STATE;
56
57
58 /**
59 * Kernel service data
60 */
61 typedef struct
62 {
63 T_GDD_DIO_KER_STATE state;
64 } T_GDD_DIO_KER_DATA;
65
66
67 /**
68 * States of a single connection
69 */
70 typedef enum
71 {
72 GDD_DIO_CON_DEAD = 1,
73 GDD_DIO_CON_CONNECT,
74 GDD_DIO_CON_READY,
75 GDD_DIO_CON_SENDING,
76 GDD_DIO_CON_CLOSE
77 } T_GDD_DIO_CON_STATE;
78
79 /**
80 * Connection data
81 */
82 typedef struct
83 {
84 T_GDD_BUF_QUEUE rx_queue; /* RX buffer queue */
85 T_GDD_BUF_QUEUE tx_queue; /* TX buffer queue */
86 UBYTE con_state; /* Connection state */
87 UBYTE wait_send_buf; /* Flag indicating that we wait for
88 a send buffer */
89 U32 dio_device; /* Dio device type */
90 T_GDD_RECEIVE_DATA_CB rcv_cb; /* Receive callback of the client */
91 T_GDD_SIGNAL_CB sig_cb; /* Signale callback of the client */
92 T_DIO_CAP_PKT dio_cap; /* DIO capabilities */
93 } T_GDD_DIO_CON_DATA;
94
95 /**
96 * DIO driver number
97 */
98 typedef U32 T_GDD_DIO_DRV_NUM;
99
100
101 /*==== EXPORTS ===============================================================*/
102
103 int inst_num_from_dev_id(U32 device);
104
105
106 #endif /* !GDD_DIO_DATA_H */