PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

aci_protocol_defines.h 9.6KB

3 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. *
  2. * *
  3. * The information contained herein is property of Nordic Semiconductor ASA.*
  4. * Terms and conditions of usage are described in detail in NORDIC *
  5. * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. *
  6. * *
  7. * Licensees are granted free, non-transferable use of the information. NO *
  8. * WARRANTY of ANY KIND is provided. This heading must NOT be removed from *
  9. * the file. *
  10. * */
  11. /* *
  12. * This file contents defines for the position of all the fields of ACI *
  13. * command or event messages *
  14. * */
  15. #ifndef ACI_OFFSET_H__
  16. #define ACI_OFFSET_H__
  17. #define OFFSET_ACI_LL_CONN_PARAMS_T_MIN_CONN_INTERVAL_LSB 0
  18. #define OFFSET_ACI_LL_CONN_PARAMS_T_MIN_CONN_INTERVAL_MSB 1
  19. #define OFFSET_ACI_LL_CONN_PARAMS_T_MAX_CONN_INTERVAL_LSB 2
  20. #define OFFSET_ACI_LL_CONN_PARAMS_T_MAX_CONN_INTERVAL_MSB 3
  21. #define OFFSET_ACI_LL_CONN_PARAMS_T_SLAVE_LATENCY_LSB 4
  22. #define OFFSET_ACI_LL_CONN_PARAMS_T_SLAVE_LATENCY_MSB 5
  23. #define OFFSET_ACI_LL_CONN_PARAMS_T_TIMEOUT_MULT_LSB 6
  24. #define OFFSET_ACI_LL_CONN_PARAMS_T_TIMEOUT_MULT_MSB 7
  25. #define OFFSET_ACI_TX_DATA_T_PIPE_NUMBER 0
  26. #define OFFSET_ACI_TX_DATA_T_ACI_DATA 1
  27. #define OFFSET_ACI_RX_DATA_T_PIPE_NUMBER 0
  28. #define OFFSET_ACI_RX_DATA_T_ACI_DATA 1
  29. #define OFFSET_ACI_CMD_PARAMS_TEST_T_TEST_MODE_CHANGE 0
  30. #define OFFSET_ACI_CMD_PARAMS_ECHO_T_ECHO_DATA 0
  31. #define OFFSET_ACI_CMD_PARAMS_DTM_CMD_T_CMD_MSB 0
  32. #define OFFSET_ACI_CMD_PARAMS_DTM_CMD_T_CMD_LSB 1
  33. #define OFFSET_ACI_CMD_PARAMS_SETUP_T_SETUP_DATA 0
  34. #define OFFSET_ACI_CMD_PARAMS_WRITE_DYNAMIC_DATA_T_SEQ_NO 0
  35. #define OFFSET_ACI_CMD_PARAMS_WRITE_DYNAMIC_DATA_T_DYNAMIC_DATA 1
  36. #define OFFSET_ACI_CMD_PARAMS_SET_LOCAL_DATA_T_TX_DATA 0
  37. #define OFFSET_ACI_CMD_PARAMS_CONNECT_T_TIMEOUT_LSB 0
  38. #define OFFSET_ACI_CMD_PARAMS_CONNECT_T_TIMEOUT_MSB 1
  39. #define OFFSET_ACI_CMD_PARAMS_CONNECT_T_ADV_INTERVAL_LSB 2
  40. #define OFFSET_ACI_CMD_PARAMS_CONNECT_T_ADV_INTERVAL_MSB 3
  41. #define OFFSET_ACI_CMD_PARAMS_BOND_T_TIMEOUT_LSB 0
  42. #define OFFSET_ACI_CMD_PARAMS_BOND_T_TIMEOUT_MSB 1
  43. #define OFFSET_ACI_CMD_PARAMS_BOND_T_ADV_INTERVAL_LSB 2
  44. #define OFFSET_ACI_CMD_PARAMS_BOND_T_ADV_INTERVAL_MSB 3
  45. #define OFFSET_ACI_CMD_PARAMS_DISCONNECT_T_REASON 0
  46. #define OFFSET_ACI_CMD_PARAMS_SET_TX_POWER_T_DEVICE_POWER 0
  47. #define OFFSET_ACI_CMD_PARAMS_CHANGE_TIMING_T_CONN_PARAMS 0
  48. #define OFFSET_ACI_CMD_PARAMS_OPEN_REMOTE_PIPE_T_PIPE_NUMBER 0
  49. #define OFFSET_ACI_CMD_PARAMS_SEND_DATA_T_TX_DATA 0
  50. #define OFFSET_ACI_CMD_PARAMS_SEND_DATA_ACK_T_PIPE_NUMBER 0
  51. #define OFFSET_ACI_CMD_PARAMS_REQUEST_DATA_T_PIPE_NUMBER 0
  52. #define OFFSET_ACI_CMD_PARAMS_SEND_DATA_NACK_T_PIPE_NUMBER 0
  53. #define OFFSET_ACI_CMD_PARAMS_SEND_DATA_NACK_T_ERROR_CODE 1
  54. #define OFFSET_ACI_CMD_PARAMS_SET_APP_LATENCY_T_MODE 0
  55. #define OFFSET_ACI_CMD_PARAMS_SET_APP_LATENCY_T_LATENCY_LSB 0
  56. #define OFFSET_ACI_CMD_PARAMS_SET_APP_LATENCY_T_LATENCY_MSB 1
  57. #define OFFSET_ACI_CMD_PARAMS_SET_KEY_T_KEY_TYPE 0
  58. #define OFFSET_ACI_CMD_PARAMS_SET_KEY_T_PASSKEY 1
  59. #define OFFSET_ACI_CMD_PARAMS_SET_KEY_T_OOB_KEY 1
  60. #define OFFSET_ACI_CMD_PARAMS_OPEN_ADV_PIPE_T_PIPES 0
  61. #define OFFSET_ACI_CMD_PARAMS_BROADCAST_T_TIMEOUT_LSB 0
  62. #define OFFSET_ACI_CMD_PARAMS_BROADCAST_T_TIMEOUT_MSB 1
  63. #define OFFSET_ACI_CMD_PARAMS_BROADCAST_T_ADV_INTERVAL_LSB 2
  64. #define OFFSET_ACI_CMD_PARAMS_BROADCAST_T_ADV_INTERVAL_MSB 3
  65. #define OFFSET_ACI_CMD_PARAMS_CLOSE_REMOTE_PIPE_T_PIPE_NUMBER 0
  66. #define OFFSET_ACI_CMD_T_LEN 0
  67. #define OFFSET_ACI_CMD_T_CMD_OPCODE 1
  68. #define OFFSET_ACI_CMD_T_TEST 2
  69. #define OFFSET_ACI_CMD_T_ECHO 2
  70. #define OFFSET_ACI_CMD_T_DTM_CMD 2
  71. #define OFFSET_ACI_CMD_T_SETUP 2
  72. #define OFFSET_ACI_CMD_T_WRITE_DYNAMIC_DATA 2
  73. #define OFFSET_ACI_CMD_T_SET_LOCAL_DATA 2
  74. #define OFFSET_ACI_CMD_T_CONNECT 2
  75. #define OFFSET_ACI_CMD_T_BOND 2
  76. #define OFFSET_ACI_CMD_T_DISCONNECT 2
  77. #define OFFSET_ACI_CMD_T_SET_TX_POWER 2
  78. #define OFFSET_ACI_CMD_T_CHANGE_TIMING 2
  79. #define OFFSET_ACI_CMD_T_OPEN_REMOTE_PIPE 2
  80. #define OFFSET_ACI_CMD_T_SEND_DATA 2
  81. #define OFFSET_ACI_CMD_T_SEND_DATA_ACK 2
  82. #define OFFSET_ACI_CMD_T_REQUEST_DATA 2
  83. #define OFFSET_ACI_CMD_T_SEND_DATA_NACK 2
  84. #define OFFSET_ACI_CMD_T_SET_APP_LATENCY 2
  85. #define OFFSET_ACI_CMD_T_SET_KEY 2
  86. #define OFFSET_ACI_CMD_T_OPEN_ADV_PIPE 2
  87. #define OFFSET_ACI_CMD_T_BROADCAST 2
  88. #define OFFSET_ACI_CMD_T_CLOSE_REMOTE_PIPE 2
  89. #define OFFSET_ACI_EVT_PARAMS_DEVICE_STARTED_T_DEVICE_MODE 0
  90. #define OFFSET_ACI_EVT_PARAMS_DEVICE_STARTED_T_HW_ERROR 1
  91. #define OFFSET_ACI_EVT_PARAMS_DEVICE_STARTED_T_CREDIT_AVAILABLE 2
  92. #define OFFSET_ACI_EVT_PARAMS_HW_ERROR_T_LINE_NUM_LSB 0
  93. #define OFFSET_ACI_EVT_PARAMS_HW_ERROR_T_LINE_NUM_MSB 1
  94. #define OFFSET_ACI_EVT_PARAMS_HW_ERROR_T_FILE_NAME 2
  95. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_DTM_CMD_T_EVT_MSB 0
  96. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_DTM_CMD_T_EVT_LSB 1
  97. #define OFFSET_ACI_EVT_CMD_RSP_READ_DYNAMIC_DATA_T_SEQ_NO 0
  98. #define OFFSET_ACI_EVT_CMD_RSP_READ_DYNAMIC_DATA_T_DYNAMIC_DATA 1
  99. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_CONFIGURATION_ID_LSB 0
  100. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_CONFIGURATION_ID_MSB 1
  101. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_ACI_VERSION 2
  102. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_FORMAT 3
  103. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_ID_LSB0 4
  104. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_ID_LSB1 5
  105. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_ID_MSB0 6
  106. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_ID_MSB1 7
  107. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_VERSION_T_SETUP_STATUS 8
  108. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_ADDRESS_T_BD_ADDR_OWN 0
  109. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_DEVICE_ADDRESS_T_BD_ADDR_TYPE 6
  110. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_BATTERY_LEVEL_T_BATTERY_LEVEL_LSB 0
  111. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_BATTERY_LEVEL_T_BATTERY_LEVEL_MSB 1
  112. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_TEMPERATURE_T_TEMPERATURE_VALUE_LSB 0
  113. #define OFFSET_ACI_EVT_CMD_RSP_PARAMS_GET_TEMPERATURE_T_TEMPERATURE_VALUE_MSB 1
  114. #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_CMD_OPCODE 0
  115. #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_CMD_STATUS 1
  116. #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_DTM_CMD 2
  117. #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_READ_DYNAMIC_DATA 2
  118. #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_GET_DEVICE_VERSION 2
  119. #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_GET_DEVICE_ADDRESS 2
  120. #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_GET_BATTERY_LEVEL 2
  121. #define OFFSET_ACI_EVT_PARAMS_CMD_RSP_T_GET_TEMPERATURE 2
  122. #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_DEV_ADDR_TYPE 0
  123. #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_DEV_ADDR 1
  124. #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_RF_INTERVAL_LSB 7
  125. #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_RF_INTERVAL_MSB 8
  126. #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_SLAVE_RF_LATENCY_LSB 9
  127. #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_SLAVE_RF_LATENCY_MSB 10
  128. #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_RF_TIMEOUT_LSB 11
  129. #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_CONN_RF_TIMEOUT_MSB 12
  130. #define OFFSET_ACI_EVT_PARAMS_CONNECTED_T_MASTER_CLOCK_ACCURACY 13
  131. #define OFFSET_ACI_EVT_PARAMS_DISCONNECTED_T_ACI_STATUS 0
  132. #define OFFSET_ACI_EVT_PARAMS_DISCONNECTED_T_BTLE_STATUS 1
  133. #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_STATUS_CODE 0
  134. #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_STATUS_SOURCE 1
  135. #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_SECMODE1_BITMAP 2
  136. #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_SECMODE2_BITMAP 3
  137. #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_KEYS_EXCHANGED_SLAVE 4
  138. #define OFFSET_ACI_EVT_PARAMS_BOND_STATUS_T_KEYS_EXCHANGED_MASTER 5
  139. #define OFFSET_ACI_EVT_PARAMS_PIPE_STATUS_T_PIPES_OPEN_BITMAP 0
  140. #define OFFSET_ACI_EVT_PARAMS_PIPE_STATUS_T_PIPES_CLOSED_BITMAP 8
  141. #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_RF_INTERVAL_LSB 0
  142. #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_RF_INTERVAL_MSB 1
  143. #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_SLAVE_RF_LATENCY_LSB 2
  144. #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_SLAVE_RF_LATENCY_MSB 3
  145. #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_RF_TIMEOUT_LSB 4
  146. #define OFFSET_ACI_EVT_PARAMS_TIMING_T_CONN_RF_TIMEOUT_MSB 5
  147. #define OFFSET_ACI_EVT_PARAMS_DATA_CREDIT_T_CREDIT 0
  148. #define OFFSET_ACI_EVT_PARAMS_DATA_ACK_T_PIPE_NUMBER 0
  149. #define OFFSET_ACI_EVT_PARAMS_DATA_RECEIVED_T_RX_DATA 0
  150. #define OFFSET_ERROR_DATA_T_CONTENT 0
  151. #define OFFSET_ACI_EVT_PARAMS_PIPE_ERROR_T_PIPE_NUMBER 0
  152. #define OFFSET_ACI_EVT_PARAMS_PIPE_ERROR_T_ERROR_CODE 1
  153. #define OFFSET_ACI_EVT_PARAMS_PIPE_ERROR_T_ERROR_DATA 2
  154. #define OFFSET_ACI_EVT_PARAMS_DISPLAY_PASSKEY_T_PASSKEY 0
  155. #define OFFSET_ACI_EVT_PARAMS_KEY_REQUEST_T_KEY_TYPE 0
  156. #define OFFSET_ACI_EVT_T_LEN 0
  157. #define OFFSET_ACI_EVT_T_EVT_OPCODE 1
  158. #define OFFSET_ACI_EVT_T_DEVICE_STARTED 2
  159. #define OFFSET_ACI_EVT_T_HW_ERROR 2
  160. #define OFFSET_ACI_EVT_T_CMD_RSP 2
  161. #define OFFSET_ACI_EVT_T_CONNECTED 2
  162. #define OFFSET_ACI_EVT_T_DISCONNECTED 2
  163. #define OFFSET_ACI_EVT_T_BOND_STATUS 2
  164. #define OFFSET_ACI_EVT_T_PIPE_STATUS 2
  165. #define OFFSET_ACI_EVT_T_TIMING 2
  166. #define OFFSET_ACI_EVT_T_DATA_CREDIT 2
  167. #define OFFSET_ACI_EVT_T_DATA_ACK 2
  168. #define OFFSET_ACI_EVT_T_DATA_RECEIVED 2
  169. #define OFFSET_ACI_EVT_T_PIPE_ERROR 2
  170. #define OFFSET_ACI_EVT_T_DISPLAY_PASSKEY 2
  171. #define OFFSET_ACI_EVT_T_KEY_REQUEST 2
  172. #endif //ACI_OFFSET_H__