upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
aci_protocol_defines.h
Go to the documentation of this file.
1 /* Copyright (c) 2014, Nordic Semiconductor ASA
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining a copy
4  * of this software and associated documentation files (the "Software"), to deal
5  * in the Software without restriction, including without limitation the rights
6  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7  * copies of the Software, and to permit persons to whom the Software is
8  * furnished to do so, subject to the following conditions:
9  *
10  * The above copyright notice and this permission notice shall be included in all
11  * copies or substantial portions of the Software.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19  * SOFTWARE.
20  */
21 
31 #ifndef ACI_OFFSET_H__
32 #define ACI_OFFSET_H__
33 
34 
35  #define OFFSET_ACI_LL_CONN_PARAMS_T_MIN_CONN_INTERVAL_LSB 0
36  #define OFFSET_ACI_LL_CONN_PARAMS_T_MIN_CONN_INTERVAL_MSB 1
37  #define OFFSET_ACI_LL_CONN_PARAMS_T_MAX_CONN_INTERVAL_LSB 2
38  #define OFFSET_ACI_LL_CONN_PARAMS_T_MAX_CONN_INTERVAL_MSB 3
39  #define OFFSET_ACI_LL_CONN_PARAMS_T_SLAVE_LATENCY_LSB 4
40  #define OFFSET_ACI_LL_CONN_PARAMS_T_SLAVE_LATENCY_MSB 5
41  #define OFFSET_ACI_LL_CONN_PARAMS_T_TIMEOUT_MULT_LSB 6
42  #define OFFSET_ACI_LL_CONN_PARAMS_T_TIMEOUT_MULT_MSB 7
43  #define OFFSET_ACI_TX_DATA_T_PIPE_NUMBER 0
44  #define OFFSET_ACI_TX_DATA_T_ACI_DATA 1
45  #define OFFSET_ACI_RX_DATA_T_PIPE_NUMBER 0
46  #define OFFSET_ACI_RX_DATA_T_ACI_DATA 1
47  #define OFFSET_ACI_CMD_PARAMS_TEST_T_TEST_MODE_CHANGE 0
48  #define OFFSET_ACI_CMD_PARAMS_ECHO_T_ECHO_DATA 0
49  #define OFFSET_ACI_CMD_PARAMS_DTM_CMD_T_CMD_MSB 0
50  #define OFFSET_ACI_CMD_PARAMS_DTM_CMD_T_CMD_LSB 1
51  #define OFFSET_ACI_CMD_PARAMS_SETUP_T_SETUP_DATA 0
52  #define OFFSET_ACI_CMD_PARAMS_WRITE_DYNAMIC_DATA_T_SEQ_NO 0
53  #define OFFSET_ACI_CMD_PARAMS_WRITE_DYNAMIC_DATA_T_DYNAMIC_DATA 1
54  #define OFFSET_ACI_CMD_PARAMS_SET_LOCAL_DATA_T_TX_DATA 0
55  #define OFFSET_ACI_CMD_PARAMS_CONNECT_T_TIMEOUT_LSB 0
56  #define OFFSET_ACI_CMD_PARAMS_CONNECT_T_TIMEOUT_MSB 1
57  #define OFFSET_ACI_CMD_PARAMS_CONNECT_T_ADV_INTERVAL_LSB 2
58  #define OFFSET_ACI_CMD_PARAMS_CONNECT_T_ADV_INTERVAL_MSB 3
59  #define OFFSET_ACI_CMD_PARAMS_BOND_T_TIMEOUT_LSB 0
60  #define OFFSET_ACI_CMD_PARAMS_BOND_T_TIMEOUT_MSB 1
61  #define OFFSET_ACI_CMD_PARAMS_BOND_T_ADV_INTERVAL_LSB 2
62  #define OFFSET_ACI_CMD_PARAMS_BOND_T_ADV_INTERVAL_MSB 3
63  #define OFFSET_ACI_CMD_PARAMS_DISCONNECT_T_REASON 0
64  #define OFFSET_ACI_CMD_PARAMS_SET_TX_POWER_T_DEVICE_POWER 0
65  #define OFFSET_ACI_CMD_PARAMS_CHANGE_TIMING_T_CONN_PARAMS 0
66  #define OFFSET_ACI_CMD_PARAMS_OPEN_REMOTE_PIPE_T_PIPE_NUMBER 0
67  #define OFFSET_ACI_CMD_PARAMS_SEND_DATA_T_TX_DATA 0
68  #define OFFSET_ACI_CMD_PARAMS_SEND_DATA_ACK_T_PIPE_NUMBER 0
69  #define OFFSET_ACI_CMD_PARAMS_REQUEST_DATA_T_PIPE_NUMBER 0
70  #define OFFSET_ACI_CMD_PARAMS_SEND_DATA_NACK_T_PIPE_NUMBER 0
71  #define OFFSET_ACI_CMD_PARAMS_SEND_DATA_NACK_T_ERROR_CODE 1
72  #define OFFSET_ACI_CMD_PARAMS_SET_APP_LATENCY_T_MODE 0
73  #define OFFSET_ACI_CMD_PARAMS_SET_APP_LATENCY_T_LATENCY_LSB 1
74  #define OFFSET_ACI_CMD_PARAMS_SET_APP_LATENCY_T_LATENCY_MSB 2
75  #define OFFSET_ACI_CMD_PARAMS_SET_KEY_T_KEY_TYPE 0
76  #define OFFSET_ACI_CMD_PARAMS_SET_KEY_T_PASSKEY 1
77  #define OFFSET_ACI_CMD_PARAMS_SET_KEY_T_OOB_KEY 1
78  #define OFFSET_ACI_CMD_PARAMS_OPEN_ADV_PIPE_T_PIPES 0
79  #define OFFSET_ACI_CMD_PARAMS_BROADCAST_T_TIMEOUT_LSB 0
80  #define OFFSET_ACI_CMD_PARAMS_BROADCAST_T_TIMEOUT_MSB 1
81  #define OFFSET_ACI_CMD_PARAMS_BROADCAST_T_ADV_INTERVAL_LSB 2
82  #define OFFSET_ACI_CMD_PARAMS_BROADCAST_T_ADV_INTERVAL_MSB 3
83  #define OFFSET_ACI_CMD_PARAMS_CLOSE_REMOTE_PIPE_T_PIPE_NUMBER 0
84  #define OFFSET_ACI_CMD_T_LEN 0
85  #define OFFSET_ACI_CMD_T_CMD_OPCODE 1
86  #define OFFSET_ACI_CMD_T_TEST 2
87  #define OFFSET_ACI_CMD_T_ECHO 2
88  #define OFFSET_ACI_CMD_T_DTM_CMD 2
89  #define OFFSET_ACI_CMD_T_SETUP 2
90  #define OFFSET_ACI_CMD_T_WRITE_DYNAMIC_DATA 2
91  #define OFFSET_ACI_CMD_T_SET_LOCAL_DATA 2
92  #define OFFSET_ACI_CMD_T_CONNECT 2
93  #define OFFSET_ACI_CMD_T_BOND 2
94  #define OFFSET_ACI_CMD_T_DISCONNECT 2
95  #define OFFSET_ACI_CMD_T_SET_TX_POWER 2
96  #define OFFSET_ACI_CMD_T_CHANGE_TIMING 2
97  #define OFFSET_ACI_CMD_T_OPEN_REMOTE_PIPE 2
98  #define OFFSET_ACI_CMD_T_SEND_DATA 2
99  #define OFFSET_ACI_CMD_T_SEND_DATA_ACK 2
100  #define OFFSET_ACI_CMD_T_REQUEST_DATA 2
101  #define OFFSET_ACI_CMD_T_SEND_DATA_NACK 2
102  #define OFFSET_ACI_CMD_T_SET_APP_LATENCY 2
103  #define OFFSET_ACI_CMD_T_SET_KEY 2
104  #define OFFSET_ACI_CMD_T_OPEN_ADV_PIPE 2
105  #define OFFSET_ACI_CMD_T_BROADCAST 2
106  #define OFFSET_ACI_CMD_T_CLOSE_REMOTE_PIPE 2
107  #define OFFSET_ACI_EVT_PARAMS_DEVICE_STARTED_T_DEVICE_MODE 0
108  #define OFFSET_ACI_EVT_PARAMS_DEVICE_STARTED_T_HW_ERROR 1
109  #define OFFSET_ACI_EVT_PARAMS_DEVICE_STARTED_T_CREDIT_AVAILABLE 2
110  #define OFFSET_ACI_EVT_PARAMS_HW_ERROR_T_LINE_NUM_LSB 0
111  #define OFFSET_ACI_EVT_PARAMS_HW_ERROR_T_LINE_NUM_MSB 1
112  #define OFFSET_ACI_EVT_PARAMS_HW_ERROR_T_FILE_NAME 2
113  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_DTM_CMD_T_EVT_MSB 0
114  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_DTM_CMD_T_EVT_LSB 1
115  #define OFFSET_ACI_EVT_CMD_RSP_READ_DYNAMIC_DATA_T_SEQ_NO 0
116  #define OFFSET_ACI_EVT_CMD_RSP_READ_DYNAMIC_DATA_T_DYNAMIC_DATA 1
117  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_CONFIGURATION_ID_LSB 0
118  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_CONFIGURATION_ID_MSB 1
119  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_ACI_VERSION 2
120  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_FORMAT 3
121  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_ID_LSB0 4
122  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_ID_LSB1 5
123  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_ID_MSB0 6
124  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_ID_MSB1 7
125  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_STATUS 8
126  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_ADDRESS_T_BD_ADDR_OWN 0
127  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_ADDRESS_T_BD_ADDR_TYPE 6
128  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_BATTERY_LEVEL_T_BATTERY_LEVEL_LSB 0
129  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_BATTERY_LEVEL_T_BATTERY_LEVEL_MSB 1
130  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_TEMPERATURE_T_TEMPERATURE_VALUE_LSB 0
131  #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_TEMPERATURE_T_TEMPERATURE_VALUE_MSB 1
132  #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_CMD_OPCODE 0
133  #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_CMD_STATUS 1
134  #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_DTM_CMD 2
135  #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_READ_DYNAMIC_DATA 2
136  #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_GET_DEVICE_VERSION 2
137  #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_GET_DEVICE_ADDRESS 2
138  #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_GET_BATTERY_LEVEL 2
139  #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_GET_TEMPERATURE 2
140  #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_DEV_ADDR_TYPE 0
141  #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_DEV_ADDR 1
142  #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_RF_INTERVAL_LSB 7
143  #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_RF_INTERVAL_MSB 8
144  #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_SLAVE_RF_LATENCY_LSB 9
145  #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_SLAVE_RF_LATENCY_MSB 10
146  #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_RF_TIMEOUT_LSB 11
147  #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_RF_TIMEOUT_MSB 12
148  #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_MASTER_CLOCK_ACCURACY 13
149  #define OFFSET_ACI_EVT_PARAMS_DISCONNECTED_T_ACI_STATUS 0
150  #define OFFSET_ACI_EVT_PARAMS_DISCONNECTED_T_BTLE_STATUS 1
151  #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_STATUS_CODE 0
152  #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_STATUS_SOURCE 1
153  #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_SECMODE1_BITMAP 2
154  #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_SECMODE2_BITMAP 3
155  #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_KEYS_EXCHANGED_SLAVE 4
156  #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_KEYS_EXCHANGED_MASTER 5
157  #define OFFSET_ACI_EVT_PARAMS_PIPE_STATUS_T_PIPES_OPEN_BITMAP 0
158  #define OFFSET_ACI_EVT_PARAMS_PIPE_STATUS_T_PIPES_CLOSED_BITMAP 8
159  #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_RF_INTERVAL_LSB 0
160  #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_RF_INTERVAL_MSB 1
161  #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_SLAVE_RF_LATENCY_LSB 2
162  #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_SLAVE_RF_LATENCY_MSB 3
163  #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_RF_TIMEOUT_LSB 4
164  #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_RF_TIMEOUT_MSB 5
165  #define OFFSET_ACI_EVT_PARAMS_DATA_CREDIT_T_CREDIT 0
166  #define OFFSET_ACI_EVT_PARAMS_DATA_ACK_T_PIPE_NUMBER 0
167  #define OFFSET_ACI_EVT_PARAMS_DATA_RECEIVED_T_RX_DATA 0
168  #define OFFSET_ERROR_DATA_T_CONTENT 0
169  #define OFFSET_ACI_EVT_PARAMS_PIPE_ERROR_T_PIPE_NUMBER 0
170  #define OFFSET_ACI_EVT_PARAMS_PIPE_ERROR_T_ERROR_CODE 1
171  #define OFFSET_ACI_EVT_PARAMS_PIPE_ERROR_T_ERROR_DATA 2
172  #define OFFSET_ACI_EVT_PARAMS_DISPLAY_PASSKEY_T_PASSKEY 0
173  #define OFFSET_ACI_EVT_PARAMS_KEY_REQUEST_T_KEY_TYPE 0
174  #define OFFSET_ACI_EVT_T_LEN 0
175  #define OFFSET_ACI_EVT_T_EVT_OPCODE 1
176  #define OFFSET_ACI_EVT_T_DEVICE_STARTED 2
177  #define OFFSET_ACI_EVT_T_HW_ERROR 2
178  #define OFFSET_ACI_EVT_T_CMD_RSP 2
179  #define OFFSET_ACI_EVT_T_CONNECTED 2
180  #define OFFSET_ACI_EVT_T_DISCONNECTED 2
181  #define OFFSET_ACI_EVT_T_BOND_STATUS 2
182  #define OFFSET_ACI_EVT_T_PIPE_STATUS 2
183  #define OFFSET_ACI_EVT_T_TIMING 2
184  #define OFFSET_ACI_EVT_T_DATA_CREDIT 2
185  #define OFFSET_ACI_EVT_T_DATA_ACK 2
186  #define OFFSET_ACI_EVT_T_DATA_RECEIVED 2
187  #define OFFSET_ACI_EVT_T_PIPE_ERROR 2
188  #define OFFSET_ACI_EVT_T_DISPLAY_PASSKEY 2
189  #define OFFSET_ACI_EVT_T_KEY_REQUEST 2
190 
191 #endif //ACI_OFFSET_H__
192