comparison src/g23m-aci/bat/bat.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 | Project : GSM-F&D (8411)
4 | Modul : BAT library
5 +-----------------------------------------------------------------------------
6 | Copyright 2005 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 : API for binary AT commands
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef BAT_H
22 #define BAT_H
23
24 #ifndef __TYPEDEFS_H__
25 #include "typedefs.h" /* for customers without busybe */
26 #endif
27
28 #include "p_bat.h" /* to include the p_bat.h */
29 #include "bat_types.h" /* to include the types for internal maintainance */
30 #include "bat_cfg.h" /* to include the configuration settings */
31
32
33 /*********************************************************************************
34 *
35 * defines
36 *
37 *********************************************************************************/
38
39 #define BAT_INSTANCE_HEADER_SIZE ((unsigned short)sizeof(void*))
40 #define BAT_INSTANCE_SIZE ((unsigned short)sizeof(T_BAT_instance_maintain) + (unsigned short)L2P_MAINTAIN_SIZE)
41 #define BAT_CLIENT_SIZE ((unsigned short)sizeof(T_BAT_client_maintain))
42
43
44 /*********************************************************************************
45 *
46 * enumerations
47 *
48 *********************************************************************************/
49
50 typedef enum
51 {
52 BAT_OK = 0,
53 BAT_BUSY_RESOURCE,
54 BAT_ERROR
55 }T_BAT_return;
56
57 typedef enum
58 {
59 BAT_ABORT = 0,
60 BAT_APP_READY_RESOURCE
61 }T_BAT_event;
62
63
64 /*********************************************************************************
65 *
66 * structures
67 *
68 *********************************************************************************/
69
70 typedef struct
71 {
72 T_BAT_event event;
73 } T_BAT_ctrl;
74
75
76 /*********************************************************************************
77 *
78 * function declarations
79 *
80 *********************************************************************************/
81
82 extern T_BAT_return bat_init (void *mem,
83 unsigned char num);
84 extern T_BAT_return bat_deinit (void);
85 extern T_BAT_return bat_new (T_BAT_instance *instance,
86 void *mem,
87 unsigned char num,
88 T_BAT_config *config,
89 void (*instance_signal_cb)(T_BAT_signal signal));
90 extern T_BAT_return bat_delete (T_BAT_instance instance);
91 extern T_BAT_return bat_open (T_BAT_instance instance,
92 T_BAT_client *client,
93 int (*response_cb)(T_BAT_client client,
94 T_BAT_cmd_response *response),
95 void (*signal_cb) (T_BAT_client client,
96 T_BAT_signal signal));
97 extern T_BAT_return bat_uns_open(T_BAT_instance instance,
98 T_BAT_client *client,
99 int (*unsolicited_result_cb)( T_BAT_client client,
100 T_BAT_cmd_response *response));
101 extern T_BAT_return bat_close (T_BAT_client client);
102 extern T_BAT_return bat_send (T_BAT_client client,
103 T_BAT_cmd_send *cmd);
104 extern T_BAT_return bat_ctrl (T_BAT_client client,
105 T_BAT_ctrl *ctrl);
106
107
108 #endif /*BAT_H*/
109
110
111
112
113
114
115
116