added debugging

Fork of BLE_nRF8001 by RedBearLab

Committer:
jn80842
Date:
Mon Nov 10 01:24:23 2014 +0000
Revision:
2:7805a5595aab
Parent:
0:075ea2812998
just added debugging

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RedBearLab 0:075ea2812998 1 /* Copyright (c) 2014, Nordic Semiconductor ASA
RedBearLab 0:075ea2812998 2 *
RedBearLab 0:075ea2812998 3 * Permission is hereby granted, free of charge, to any person obtaining a copy
RedBearLab 0:075ea2812998 4 * of this software and associated documentation files (the "Software"), to deal
RedBearLab 0:075ea2812998 5 * in the Software without restriction, including without limitation the rights
RedBearLab 0:075ea2812998 6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
RedBearLab 0:075ea2812998 7 * copies of the Software, and to permit persons to whom the Software is
RedBearLab 0:075ea2812998 8 * furnished to do so, subject to the following conditions:
RedBearLab 0:075ea2812998 9 *
RedBearLab 0:075ea2812998 10 * The above copyright notice and this permission notice shall be included in all
RedBearLab 0:075ea2812998 11 * copies or substantial portions of the Software.
RedBearLab 0:075ea2812998 12 *
RedBearLab 0:075ea2812998 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
RedBearLab 0:075ea2812998 14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
RedBearLab 0:075ea2812998 15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
RedBearLab 0:075ea2812998 16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
RedBearLab 0:075ea2812998 17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
RedBearLab 0:075ea2812998 18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
RedBearLab 0:075ea2812998 19 * SOFTWARE.
RedBearLab 0:075ea2812998 20 */
RedBearLab 0:075ea2812998 21
RedBearLab 0:075ea2812998 22 /**
RedBearLab 0:075ea2812998 23 * @file
RedBearLab 0:075ea2812998 24 *
RedBearLab 0:075ea2812998 25 * @ingroup group_acilib
RedBearLab 0:075ea2812998 26 *
RedBearLab 0:075ea2812998 27 * @brief Prototypes for the acilib interfaces.
RedBearLab 0:075ea2812998 28 */
RedBearLab 0:075ea2812998 29
RedBearLab 0:075ea2812998 30 #ifndef _acilib_IF_H_
RedBearLab 0:075ea2812998 31 #define _acilib_IF_H_
RedBearLab 0:075ea2812998 32
RedBearLab 0:075ea2812998 33 /** @brief Encode the ACI message for set test mode command
RedBearLab 0:075ea2812998 34 *
RedBearLab 0:075ea2812998 35 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 36 * @param[in] test_mode Pointer to the test mode in ::aci_cmd_params_test_t
RedBearLab 0:075ea2812998 37 *
RedBearLab 0:075ea2812998 38 * @return None
RedBearLab 0:075ea2812998 39 */
RedBearLab 0:075ea2812998 40 void acil_encode_cmd_set_test_mode(uint8_t *buffer, aci_cmd_params_test_t *p_aci_cmd_params_test);
RedBearLab 0:075ea2812998 41
RedBearLab 0:075ea2812998 42 /** @brief Encode the ACI message for sleep command
RedBearLab 0:075ea2812998 43 *
RedBearLab 0:075ea2812998 44 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 45 *
RedBearLab 0:075ea2812998 46 * @return None
RedBearLab 0:075ea2812998 47 */
RedBearLab 0:075ea2812998 48 void acil_encode_cmd_sleep(uint8_t *buffer);
RedBearLab 0:075ea2812998 49
RedBearLab 0:075ea2812998 50 /** @brief Encode the ACI message for get device version
RedBearLab 0:075ea2812998 51 *
RedBearLab 0:075ea2812998 52 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 53 *
RedBearLab 0:075ea2812998 54 * @return None
RedBearLab 0:075ea2812998 55 */
RedBearLab 0:075ea2812998 56 void acil_encode_cmd_get_device_version(uint8_t *buffer);
RedBearLab 0:075ea2812998 57
RedBearLab 0:075ea2812998 58 /** @brief Encode the ACI message for set local data
RedBearLab 0:075ea2812998 59 *
RedBearLab 0:075ea2812998 60 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 61 * @param[in] p_aci_cmd_params_set_local_data Pointer to the local data parameters in ::aci_cmd_params_set_local_data_t
RedBearLab 0:075ea2812998 62 * @param[in] data_size Size of data message
RedBearLab 0:075ea2812998 63 *
RedBearLab 0:075ea2812998 64 * @return None
RedBearLab 0:075ea2812998 65 */
RedBearLab 0:075ea2812998 66 void acil_encode_cmd_set_local_data(uint8_t *buffer, aci_cmd_params_set_local_data_t *p_aci_cmd_params_set_local_data, uint8_t data_size);
RedBearLab 0:075ea2812998 67
RedBearLab 0:075ea2812998 68 /** @brief Encode the ACI message to connect
RedBearLab 0:075ea2812998 69 *
RedBearLab 0:075ea2812998 70 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 71 * @param[in] p_aci_cmd_params_connect Pointer to the run parameters in ::aci_cmd_params_connect_t
RedBearLab 0:075ea2812998 72 *
RedBearLab 0:075ea2812998 73 * @return None
RedBearLab 0:075ea2812998 74 */
RedBearLab 0:075ea2812998 75 void acil_encode_cmd_connect(uint8_t *buffer, aci_cmd_params_connect_t *p_aci_cmd_params_connect);
RedBearLab 0:075ea2812998 76
RedBearLab 0:075ea2812998 77 /** @brief Encode the ACI message to bond
RedBearLab 0:075ea2812998 78 *
RedBearLab 0:075ea2812998 79 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 80 * @param[in] p_aci_cmd_params_bond Pointer to the run parameters in ::aci_cmd_params_bond_t
RedBearLab 0:075ea2812998 81 *
RedBearLab 0:075ea2812998 82 * @return None
RedBearLab 0:075ea2812998 83 */
RedBearLab 0:075ea2812998 84 void acil_encode_cmd_bond(uint8_t *buffer, aci_cmd_params_bond_t *p_aci_cmd_params_bond);
RedBearLab 0:075ea2812998 85
RedBearLab 0:075ea2812998 86 /** @brief Encode the ACI message to disconnect
RedBearLab 0:075ea2812998 87 *
RedBearLab 0:075ea2812998 88 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 89 * @param[in] p_aci_cmd_params_disconnect Pointer to the run parameters in ::aci_cmd_params_disconnect_t
RedBearLab 0:075ea2812998 90 *
RedBearLab 0:075ea2812998 91 * @return None
RedBearLab 0:075ea2812998 92 */
RedBearLab 0:075ea2812998 93 void acil_encode_cmd_disconnect(uint8_t *buffer, aci_cmd_params_disconnect_t *p_aci_cmd_params_disconnect);
RedBearLab 0:075ea2812998 94
RedBearLab 0:075ea2812998 95 /** @brief Encode the ACI message to baseband reset
RedBearLab 0:075ea2812998 96 *
RedBearLab 0:075ea2812998 97 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 98 *
RedBearLab 0:075ea2812998 99 * @return None
RedBearLab 0:075ea2812998 100 */
RedBearLab 0:075ea2812998 101 void acil_encode_baseband_reset(uint8_t *buffer);
RedBearLab 0:075ea2812998 102
RedBearLab 0:075ea2812998 103 /** @brief Encode the ACI message for Directed Advertising
RedBearLab 0:075ea2812998 104 *
RedBearLab 0:075ea2812998 105 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 106 *
RedBearLab 0:075ea2812998 107 * @return None
RedBearLab 0:075ea2812998 108 */
RedBearLab 0:075ea2812998 109 void acil_encode_direct_connect(uint8_t *buffer);
RedBearLab 0:075ea2812998 110
RedBearLab 0:075ea2812998 111 /** @brief Encode the ACI message to wakeup
RedBearLab 0:075ea2812998 112 *
RedBearLab 0:075ea2812998 113 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 114 *
RedBearLab 0:075ea2812998 115 * @return None
RedBearLab 0:075ea2812998 116 */
RedBearLab 0:075ea2812998 117 void acil_encode_cmd_wakeup(uint8_t *buffer);
RedBearLab 0:075ea2812998 118
RedBearLab 0:075ea2812998 119 /** @brief Encode the ACI message for set radio Tx power
RedBearLab 0:075ea2812998 120 *
RedBearLab 0:075ea2812998 121 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 122 * @param[in] p_aci_cmd_params_set_tx_power Pointer to the set Tx power parameters in ::aci_cmd_params_set_tx_power_t
RedBearLab 0:075ea2812998 123 *
RedBearLab 0:075ea2812998 124 * @return None
RedBearLab 0:075ea2812998 125 */
RedBearLab 0:075ea2812998 126 void acil_encode_cmd_set_radio_tx_power(uint8_t *buffer, aci_cmd_params_set_tx_power_t *p_aci_cmd_params_set_tx_power);
RedBearLab 0:075ea2812998 127
RedBearLab 0:075ea2812998 128 /** @brief Encode the ACI message for get device address
RedBearLab 0:075ea2812998 129 *
RedBearLab 0:075ea2812998 130 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 131 *
RedBearLab 0:075ea2812998 132 * @return None
RedBearLab 0:075ea2812998 133 */
RedBearLab 0:075ea2812998 134 void acil_encode_cmd_get_address(uint8_t *buffer);
RedBearLab 0:075ea2812998 135
RedBearLab 0:075ea2812998 136 /** @brief Encode the ACI message for send data
RedBearLab 0:075ea2812998 137 *
RedBearLab 0:075ea2812998 138 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 139 * @param[in] p_aci_cmd_params_send_data_t Pointer to the data parameters in ::aci_cmd_params_send_data_t
RedBearLab 0:075ea2812998 140 * @param[in] data_size Size of data message
RedBearLab 0:075ea2812998 141 *
RedBearLab 0:075ea2812998 142 * @return None
RedBearLab 0:075ea2812998 143 */
RedBearLab 0:075ea2812998 144 void acil_encode_cmd_send_data(uint8_t *buffer, aci_cmd_params_send_data_t *p_aci_cmd_params_send_data_t, uint8_t data_size);
RedBearLab 0:075ea2812998 145
RedBearLab 0:075ea2812998 146 /** @brief Encode the ACI message for request data
RedBearLab 0:075ea2812998 147 *
RedBearLab 0:075ea2812998 148 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 149 * @param[in] p_aci_cmd_params_request_data Pointer to the request data parameters in ::aci_cmd_params_request_data_t
RedBearLab 0:075ea2812998 150 *
RedBearLab 0:075ea2812998 151 * @return None
RedBearLab 0:075ea2812998 152 */
RedBearLab 0:075ea2812998 153 void acil_encode_cmd_request_data(uint8_t *buffer, aci_cmd_params_request_data_t *p_aci_cmd_params_request_data);
RedBearLab 0:075ea2812998 154
RedBearLab 0:075ea2812998 155 /** @brief Encode the ACI message for open remote pipe
RedBearLab 0:075ea2812998 156 *
RedBearLab 0:075ea2812998 157 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 158 * @param[in] p_aci_cmd_params_open_remote_pipe Pointer to the dynamic data parameters in ::aci_cmd_params_open_remote_pipe_t
RedBearLab 0:075ea2812998 159 *
RedBearLab 0:075ea2812998 160 * @return None
RedBearLab 0:075ea2812998 161 */
RedBearLab 0:075ea2812998 162 void acil_encode_cmd_open_remote_pipe(uint8_t *buffer, aci_cmd_params_open_remote_pipe_t *p_aci_cmd_params_open_remote_pipe);
RedBearLab 0:075ea2812998 163
RedBearLab 0:075ea2812998 164 /** @brief Encode the ACI message for close remote pipe
RedBearLab 0:075ea2812998 165 *
RedBearLab 0:075ea2812998 166 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 167 * @param[in] p_aci_cmd_params_close_remote_pipe Pointer to the dynamic data parameters in ::aci_cmd_params_close_remote_pipe_t
RedBearLab 0:075ea2812998 168 *
RedBearLab 0:075ea2812998 169 * @return None
RedBearLab 0:075ea2812998 170 */
RedBearLab 0:075ea2812998 171 void acil_encode_cmd_close_remote_pipe(uint8_t *buffer, aci_cmd_params_close_remote_pipe_t *p_aci_cmd_params_close_remote_pipe);
RedBearLab 0:075ea2812998 172
RedBearLab 0:075ea2812998 173 /** @brief Encode the ACI message for echo message
RedBearLab 0:075ea2812998 174 *
RedBearLab 0:075ea2812998 175 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 176 * @param[in] p_cmd_params_echo Pointer to the dynamic data parameters in ::aci_cmd_params_echo_t
RedBearLab 0:075ea2812998 177 * @param[in] msg_size Size of the message
RedBearLab 0:075ea2812998 178 *
RedBearLab 0:075ea2812998 179 * @return None
RedBearLab 0:075ea2812998 180 */
RedBearLab 0:075ea2812998 181 void acil_encode_cmd_echo_msg(uint8_t *buffer, aci_cmd_params_echo_t *p_cmd_params_echo, uint8_t msg_size);
RedBearLab 0:075ea2812998 182
RedBearLab 0:075ea2812998 183 /** @brief Encode the ACI message to battery level
RedBearLab 0:075ea2812998 184 *
RedBearLab 0:075ea2812998 185 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 186 *
RedBearLab 0:075ea2812998 187 * @return None
RedBearLab 0:075ea2812998 188 */
RedBearLab 0:075ea2812998 189 void acil_encode_cmd_battery_level(uint8_t *buffer);
RedBearLab 0:075ea2812998 190
RedBearLab 0:075ea2812998 191 /** @brief Encode the ACI message to temparature
RedBearLab 0:075ea2812998 192 *
RedBearLab 0:075ea2812998 193 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 194 *
RedBearLab 0:075ea2812998 195 * @return None
RedBearLab 0:075ea2812998 196 */
RedBearLab 0:075ea2812998 197 void acil_encode_cmd_temparature(uint8_t *buffer);
RedBearLab 0:075ea2812998 198
RedBearLab 0:075ea2812998 199 /** @brief Encode the ACI message to read dynamic data
RedBearLab 0:075ea2812998 200 *
RedBearLab 0:075ea2812998 201 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 202 *
RedBearLab 0:075ea2812998 203 * @return None
RedBearLab 0:075ea2812998 204 */
RedBearLab 0:075ea2812998 205 void acil_encode_cmd_read_dynamic_data(uint8_t *buffer);
RedBearLab 0:075ea2812998 206
RedBearLab 0:075ea2812998 207 /** @brief Encode the ACI message to change timing request
RedBearLab 0:075ea2812998 208 *
RedBearLab 0:075ea2812998 209 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 210 * @param[in] p_aci_cmd_params_change_timing Pointer to the change timing parameters in ::aci_cmd_params_change_timing_t
RedBearLab 0:075ea2812998 211 *
RedBearLab 0:075ea2812998 212 * @return None
RedBearLab 0:075ea2812998 213 */
RedBearLab 0:075ea2812998 214 void acil_encode_cmd_change_timing_req(uint8_t *buffer, aci_cmd_params_change_timing_t *p_aci_cmd_params_change_timing);
RedBearLab 0:075ea2812998 215
RedBearLab 0:075ea2812998 216 /** @brief Encode the ACI message to change timing request using the timing parameters from GAP PPCP
RedBearLab 0:075ea2812998 217 *
RedBearLab 0:075ea2812998 218 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 219 * @param[in] p_aci_cmd_params_change_timing Pointer to the change timing parameters in ::aci_cmd_params_change_timing_t
RedBearLab 0:075ea2812998 220 *
RedBearLab 0:075ea2812998 221 * @return None
RedBearLab 0:075ea2812998 222 */
RedBearLab 0:075ea2812998 223 void acil_encode_cmd_change_timing_req_GAP_PPCP(uint8_t *buffer);
RedBearLab 0:075ea2812998 224
RedBearLab 0:075ea2812998 225
RedBearLab 0:075ea2812998 226 /** @brief Encode the ACI message for write dynamic data
RedBearLab 0:075ea2812998 227 *
RedBearLab 0:075ea2812998 228 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 229 * @param[in] seq_no Sequence number of the dynamic data (as received in the response to @c Read Dynamic Data)
RedBearLab 0:075ea2812998 230 * @param[in] dynamic_data Pointer to the dynamic data
RedBearLab 0:075ea2812998 231 * @param[in] dynamic_data_size Size of dynamic data
RedBearLab 0:075ea2812998 232 *
RedBearLab 0:075ea2812998 233 * @return None
RedBearLab 0:075ea2812998 234 */
RedBearLab 0:075ea2812998 235 void acil_encode_cmd_write_dynamic_data(uint8_t *buffer, uint8_t seq_no, uint8_t* dynamic_data, uint8_t dynamic_data_size);
RedBearLab 0:075ea2812998 236
RedBearLab 0:075ea2812998 237 /** @brief Encode the ACI message to send data acknowledgement
RedBearLab 0:075ea2812998 238 *
RedBearLab 0:075ea2812998 239 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 240 * @param[in] pipe_number Pipe number for which the ack is to be sent
RedBearLab 0:075ea2812998 241 *
RedBearLab 0:075ea2812998 242 * @return None
RedBearLab 0:075ea2812998 243 */
RedBearLab 0:075ea2812998 244 void acil_encode_cmd_send_data_ack(uint8_t *buffer, const uint8_t pipe_number);
RedBearLab 0:075ea2812998 245
RedBearLab 0:075ea2812998 246 /** @brief Encode the ACI message to send negative acknowledgement
RedBearLab 0:075ea2812998 247 *
RedBearLab 0:075ea2812998 248 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 249 * @param[in] pipe_number Pipe number for which the nack is to be sent
RedBearLab 0:075ea2812998 250 * @param[in] error_code Error code that has to be sent in the NACK
RedBearLab 0:075ea2812998 251 *
RedBearLab 0:075ea2812998 252 * @return None
RedBearLab 0:075ea2812998 253 */
RedBearLab 0:075ea2812998 254 void acil_encode_cmd_send_data_nack(uint8_t *buffer, const uint8_t pipe_number,const uint8_t error_code);
RedBearLab 0:075ea2812998 255
RedBearLab 0:075ea2812998 256 /** @brief Encode the ACI message to set the application latency
RedBearLab 0:075ea2812998 257 *
RedBearLab 0:075ea2812998 258 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 259 * @param[in] p_aci_cmd_params_set_app_latency Pointer to the set_application_latency command parameters in ::aci_cmd_params_dtm_cmd_t
RedBearLab 0:075ea2812998 260 *
RedBearLab 0:075ea2812998 261 * @return None
RedBearLab 0:075ea2812998 262 */
RedBearLab 0:075ea2812998 263 void acil_encode_cmd_set_app_latency(uint8_t *buffer, aci_cmd_params_set_app_latency_t *p_aci_cmd_params_set_app_latency);
RedBearLab 0:075ea2812998 264
RedBearLab 0:075ea2812998 265 /** @brief Encode the ACI message for setup
RedBearLab 0:075ea2812998 266 *
RedBearLab 0:075ea2812998 267 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 268 * @param[in] p_cmd_params_set_run_behaviour Pointer to the setup data in ::aci_cmd_params_setup_t
RedBearLab 0:075ea2812998 269 * @param[in] setup_data_size Size of setup message
RedBearLab 0:075ea2812998 270 *
RedBearLab 0:075ea2812998 271 * @return None
RedBearLab 0:075ea2812998 272 */
RedBearLab 0:075ea2812998 273 void acil_encode_cmd_setup(uint8_t *buffer, aci_cmd_params_setup_t *p_aci_cmd_params_setup, uint8_t setup_data_size);
RedBearLab 0:075ea2812998 274
RedBearLab 0:075ea2812998 275 /** @brief Encode the ACI message for DTM command
RedBearLab 0:075ea2812998 276 *
RedBearLab 0:075ea2812998 277 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 278 * @param[in] p_cmd_params_set_run_behaviour Pointer to the DTM command parameters in ::aci_cmd_params_dtm_cmd_t
RedBearLab 0:075ea2812998 279 *
RedBearLab 0:075ea2812998 280 * @return None
RedBearLab 0:075ea2812998 281 */
RedBearLab 0:075ea2812998 282 void acil_encode_cmd_dtm_cmd(uint8_t *buffer, aci_cmd_params_dtm_cmd_t *p_aci_cmd_params_dtm_cmd);
RedBearLab 0:075ea2812998 283
RedBearLab 0:075ea2812998 284 /** @brief Encode the ACI message for Set Key Request command
RedBearLab 0:075ea2812998 285 *
RedBearLab 0:075ea2812998 286 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 287 *
RedBearLab 0:075ea2812998 288 * @return None
RedBearLab 0:075ea2812998 289 */
RedBearLab 0:075ea2812998 290 void acil_encode_cmd_set_key(uint8_t *buffer, aci_cmd_params_set_key_t *p_aci_cmd_params_set_key);
RedBearLab 0:075ea2812998 291
RedBearLab 0:075ea2812998 292 /** @brief Encode the ACI message for Bond Security Request command
RedBearLab 0:075ea2812998 293 *
RedBearLab 0:075ea2812998 294 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 295 *
RedBearLab 0:075ea2812998 296 * @return None
RedBearLab 0:075ea2812998 297 */
RedBearLab 0:075ea2812998 298 void acil_encode_cmd_bond_security_request(uint8_t *buffer);
RedBearLab 0:075ea2812998 299
RedBearLab 0:075ea2812998 300 /** @brief Encode the ACI message
RedBearLab 0:075ea2812998 301 *
RedBearLab 0:075ea2812998 302 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 303 * @param[in] p_aci_cmd Pointer to ACI command data in ::aci_cmd_t
RedBearLab 0:075ea2812998 304 * @param[in] bool
RedBearLab 0:075ea2812998 305 *
RedBearLab 0:075ea2812998 306 * @return bool true, if succesful, else returns false
RedBearLab 0:075ea2812998 307 */
RedBearLab 0:075ea2812998 308 bool acil_encode_cmd(uint8_t *buffer, aci_cmd_t *p_aci_cmd);
RedBearLab 0:075ea2812998 309
RedBearLab 0:075ea2812998 310 /** @brief Encode the ACI message for Broadcast command
RedBearLab 0:075ea2812998 311 *
RedBearLab 0:075ea2812998 312 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 313 * @param[in] p_aci_cmd Pointer to ACI command data in ::aci_cmd_params_broadcast_t
RedBearLab 0:075ea2812998 314 *
RedBearLab 0:075ea2812998 315 * @return None
RedBearLab 0:075ea2812998 316 */
RedBearLab 0:075ea2812998 317 void acil_encode_cmd_broadcast(uint8_t *buffer, aci_cmd_params_broadcast_t * p_aci_cmd_params_broadcast);
RedBearLab 0:075ea2812998 318
RedBearLab 0:075ea2812998 319 /** @brief Encode the ACI message for Open Adv Pipes
RedBearLab 0:075ea2812998 320 *
RedBearLab 0:075ea2812998 321 * @param[in,out] buffer Pointer to ACI message buffer
RedBearLab 0:075ea2812998 322 * @param[in] p_aci_cmd Pointer to ACI command data in ::aci_cmd_params_open_adv_pipe_t
RedBearLab 0:075ea2812998 323 *
RedBearLab 0:075ea2812998 324 * @return None
RedBearLab 0:075ea2812998 325 */
RedBearLab 0:075ea2812998 326 void acil_encode_cmd_open_adv_pipes(uint8_t *buffer, aci_cmd_params_open_adv_pipe_t * p_aci_cmd_params_set_adv_svc_data);
RedBearLab 0:075ea2812998 327
RedBearLab 0:075ea2812998 328 /** @brief Decode the ACI event command response
RedBearLab 0:075ea2812998 329 *
RedBearLab 0:075ea2812998 330 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 331 * @param[in,out] buffer Pointer to the decoded message in ::aci_evt_params_cmd_rsp_t
RedBearLab 0:075ea2812998 332 *
RedBearLab 0:075ea2812998 333 * @return None
RedBearLab 0:075ea2812998 334 */
RedBearLab 0:075ea2812998 335 void acil_decode_evt_command_response(uint8_t *buffer_in, aci_evt_params_cmd_rsp_t *p_evt_params_cmd_rsp);
RedBearLab 0:075ea2812998 336
RedBearLab 0:075ea2812998 337 /** @brief Decode the ACI event device started
RedBearLab 0:075ea2812998 338 *
RedBearLab 0:075ea2812998 339 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 340 * @param[in,out] p_aci_evt Pointer to the decoded message in ::aci_evt_params_device_started_t
RedBearLab 0:075ea2812998 341 *
RedBearLab 0:075ea2812998 342 * @return None
RedBearLab 0:075ea2812998 343 */
RedBearLab 0:075ea2812998 344 void acil_decode_evt_device_started(uint8_t *buffer_in, aci_evt_params_device_started_t *p_evt_params_device_started);
RedBearLab 0:075ea2812998 345
RedBearLab 0:075ea2812998 346 /** @brief Decode the ACI event pipe status
RedBearLab 0:075ea2812998 347 *
RedBearLab 0:075ea2812998 348 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 349 * @param[in,out] p_aci_evt_params_pipe_status Pointer to the decoded message in ::aci_evt_params_pipe_status_t
RedBearLab 0:075ea2812998 350 *
RedBearLab 0:075ea2812998 351 * @return None
RedBearLab 0:075ea2812998 352 */
RedBearLab 0:075ea2812998 353 void acil_decode_evt_pipe_status(uint8_t *buffer_in, aci_evt_params_pipe_status_t *p_aci_evt_params_pipe_status);
RedBearLab 0:075ea2812998 354
RedBearLab 0:075ea2812998 355 /** @brief Decode the ACI event for disconnected
RedBearLab 0:075ea2812998 356 *
RedBearLab 0:075ea2812998 357 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 358 * @param[in,out] p_aci_evt_params_disconnected Pointer to the decoded message in ::aci_evt_params_disconnected_t
RedBearLab 0:075ea2812998 359 *
RedBearLab 0:075ea2812998 360 * @return None
RedBearLab 0:075ea2812998 361 */
RedBearLab 0:075ea2812998 362 void acil_decode_evt_disconnected(uint8_t *buffer_in, aci_evt_params_disconnected_t *p_aci_evt_params_disconnected);
RedBearLab 0:075ea2812998 363
RedBearLab 0:075ea2812998 364 /** @brief Decode the ACI event for bond status
RedBearLab 0:075ea2812998 365 *
RedBearLab 0:075ea2812998 366 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 367 * @param[in,out] p_aci_evt_params_bond_status Pointer to the decoded message in ::aci_evt_params_bond_status_t
RedBearLab 0:075ea2812998 368 *
RedBearLab 0:075ea2812998 369 * @return None
RedBearLab 0:075ea2812998 370 */
RedBearLab 0:075ea2812998 371 void acil_decode_evt_bond_status(uint8_t *buffer_in, aci_evt_params_bond_status_t *p_aci_evt_params_bond_status);
RedBearLab 0:075ea2812998 372
RedBearLab 0:075ea2812998 373 /** @brief Decode the ACI event for data received
RedBearLab 0:075ea2812998 374 *
RedBearLab 0:075ea2812998 375 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 376 * @param[in,out] p_evt_params_data_received Pointer to the decoded message in ::aci_evt_params_data_received_t
RedBearLab 0:075ea2812998 377 *
RedBearLab 0:075ea2812998 378 * @return size Received data size
RedBearLab 0:075ea2812998 379 */
RedBearLab 0:075ea2812998 380 uint8_t acil_decode_evt_data_received(uint8_t *buffer_in, aci_evt_params_data_received_t *p_evt_params_data_received);
RedBearLab 0:075ea2812998 381
RedBearLab 0:075ea2812998 382 /** @brief Decode the ACI event data acknowledgement
RedBearLab 0:075ea2812998 383 *
RedBearLab 0:075ea2812998 384 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 385 * @param[in,out] p_evt_params_data_ack Pointer to the decoded message in ::aci_evt_params_data_ack_t
RedBearLab 0:075ea2812998 386 *
RedBearLab 0:075ea2812998 387 * @return None
RedBearLab 0:075ea2812998 388 */
RedBearLab 0:075ea2812998 389 void acil_decode_evt_data_ack(uint8_t *buffer_in, aci_evt_params_data_ack_t *p_evt_params_data_ack);
RedBearLab 0:075ea2812998 390
RedBearLab 0:075ea2812998 391 /** @brief Decode the ACI event for hardware error
RedBearLab 0:075ea2812998 392 *
RedBearLab 0:075ea2812998 393 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 394 * @param[in,out] p_aci_evt_params_hw_error Pointer to the decoded message in ::aci_evt_params_hw_error_t
RedBearLab 0:075ea2812998 395 *
RedBearLab 0:075ea2812998 396 * @return size Size of debug information
RedBearLab 0:075ea2812998 397 */
RedBearLab 0:075ea2812998 398 uint8_t acil_decode_evt_hw_error(uint8_t *buffer_in, aci_evt_params_hw_error_t *p_aci_evt_params_hw_error);
RedBearLab 0:075ea2812998 399
RedBearLab 0:075ea2812998 400 /** @brief Decode the ACI event data credit
RedBearLab 0:075ea2812998 401 *
RedBearLab 0:075ea2812998 402 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 403 * @param[in,out] p_evt_params_data_credit Pointer to the decoded message in ::aci_evt_params_data_credit_t
RedBearLab 0:075ea2812998 404 *
RedBearLab 0:075ea2812998 405 * @return None
RedBearLab 0:075ea2812998 406 */
RedBearLab 0:075ea2812998 407 void acil_decode_evt_credit(uint8_t *buffer_in, aci_evt_params_data_credit_t *p_evt_params_data_credit);
RedBearLab 0:075ea2812998 408
RedBearLab 0:075ea2812998 409 /** @brief Decode the ACI event for connected
RedBearLab 0:075ea2812998 410 *
RedBearLab 0:075ea2812998 411 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 412 * @param[in,out] p_aci_evt_params_connected Pointer to the decoded message in ::aci_evt_params_connected_t
RedBearLab 0:075ea2812998 413 *
RedBearLab 0:075ea2812998 414 * @return None
RedBearLab 0:075ea2812998 415 */
RedBearLab 0:075ea2812998 416 void acil_decode_evt_connected(uint8_t *buffer_in, aci_evt_params_connected_t *p_aci_evt_params_connected);
RedBearLab 0:075ea2812998 417
RedBearLab 0:075ea2812998 418 /** @brief Decode the ACI event for timing
RedBearLab 0:075ea2812998 419 *
RedBearLab 0:075ea2812998 420 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 421 * @param[in,out] p_evt_params_timing Pointer to the decoded message in ::aci_evt_params_timing_t
RedBearLab 0:075ea2812998 422 *
RedBearLab 0:075ea2812998 423 * @return None
RedBearLab 0:075ea2812998 424 */
RedBearLab 0:075ea2812998 425 void acil_decode_evt_timing(uint8_t *buffer_in, aci_evt_params_timing_t *p_evt_params_timing);
RedBearLab 0:075ea2812998 426
RedBearLab 0:075ea2812998 427 /** @brief Decode the ACI event for pipe error
RedBearLab 0:075ea2812998 428 *
RedBearLab 0:075ea2812998 429 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 430 * @param[in,out] p_evt_params_pipe_error Pointer to the decoded message in ::aci_evt_params_pipe_error_t
RedBearLab 0:075ea2812998 431 *
RedBearLab 0:075ea2812998 432 */
RedBearLab 0:075ea2812998 433 void acil_decode_evt_pipe_error(uint8_t *buffer_in, aci_evt_params_pipe_error_t *p_evt_params_pipe_error);
RedBearLab 0:075ea2812998 434
RedBearLab 0:075ea2812998 435 /** @brief Decode the ACI event for key request
RedBearLab 0:075ea2812998 436 *
RedBearLab 0:075ea2812998 437 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 438 * @param[in,out] p_evt_params_key_type Pointer to the decoded message in ::aci_evt_params_key_type_t
RedBearLab 0:075ea2812998 439 *
RedBearLab 0:075ea2812998 440 * @return None
RedBearLab 0:075ea2812998 441 */
RedBearLab 0:075ea2812998 442 void acil_decode_evt_key_request(uint8_t *buffer_in, aci_evt_params_key_request_t *p_evt_params_key_request);
RedBearLab 0:075ea2812998 443
RedBearLab 0:075ea2812998 444 /** @brief Decode the ACI event for echo
RedBearLab 0:075ea2812998 445 *
RedBearLab 0:075ea2812998 446 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 447 * @param[in,out] buffer_out Pointer to the echo message (max size of buffer ::ACI_ECHO_DATA_MAX_LEN)
RedBearLab 0:075ea2812998 448 *
RedBearLab 0:075ea2812998 449 * @return size Received echo message size
RedBearLab 0:075ea2812998 450 */
RedBearLab 0:075ea2812998 451 uint8_t acil_decode_evt_echo(uint8_t *buffer_in, aci_evt_params_echo_t *buffer_out);
RedBearLab 0:075ea2812998 452
RedBearLab 0:075ea2812998 453 /** @brief Decode the ACI event
RedBearLab 0:075ea2812998 454 *
RedBearLab 0:075ea2812998 455 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 456 * @param[in,out] p_aci_evt Pointer to the decoded message in ::aci_evt_t
RedBearLab 0:075ea2812998 457 *
RedBearLab 0:075ea2812998 458 * @return bool true, if succesful, else returns false
RedBearLab 0:075ea2812998 459 */
RedBearLab 0:075ea2812998 460 bool acil_decode_evt(uint8_t *buffer_in, aci_evt_t *p_aci_evt);
RedBearLab 0:075ea2812998 461
RedBearLab 0:075ea2812998 462 /** @brief Decode the Display Key Event
RedBearLab 0:075ea2812998 463 *
RedBearLab 0:075ea2812998 464 * @param[in] buffer_in Pointer to message received
RedBearLab 0:075ea2812998 465 * @param[in,out] p_aci_evt Pointer to the decoded message in ::aci_evt_params_display_passkey_t
RedBearLab 0:075ea2812998 466 *
RedBearLab 0:075ea2812998 467 * @return None
RedBearLab 0:075ea2812998 468 */
RedBearLab 0:075ea2812998 469 void acil_decode_evt_display_passkey(uint8_t *buffer_in, aci_evt_params_display_passkey_t *p_aci_evt_params_display_passkey);
RedBearLab 0:075ea2812998 470
RedBearLab 0:075ea2812998 471 #endif /* _acilib_IF_H_ */