Ranging Service API. More...
#include "gr_includes.h"
#include "custom_config.h"
#include "ble_prf_utils.h"
#include "ras_common.h"
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Macros | |
#define | RAS_CACHE_PROC_NUM (2) |
Functions | |
sdk_err_t | ras_service_init (uint32_t features) |
Initialize Ranging Service. More... | |
void | ras_connect_handler (uint8_t conn_idx) |
Handle for the connection event. More... | |
void | ras_disconnect_handler (uint8_t conn_idx) |
Handle for the disconnection event. More... | |
void | ras_mtu_exch_handler (uint8_t conn_idx, uint16_t mtu) |
Handle for the mtu exchange event. More... | |
void | ras_rcv_subevt_data_handler (uint8_t conn_idx, uint8_t *p_data) |
Handle for receiving subevt data. More... | |
void | ras_set_cache_data_info (uint8_t conn_idx, uint8_t cfg_id, uint8_t proc_num, uint8_t subevt_num) |
Set cache data information. More... | |
void | ras_proc_disabled_handler (uint8_t conn_idx, uint8_t cfg_id) |
Set cache data information. More... | |
Ranging Service API.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file ras.h.
void ras_connect_handler | ( | uint8_t | conn_idx | ) |
Handle for the connection event.
[in] | conn_idx | Connection index. |
void ras_disconnect_handler | ( | uint8_t | conn_idx | ) |
Handle for the disconnection event.
[in] | conn_idx | Connection index. |
void ras_mtu_exch_handler | ( | uint8_t | conn_idx, |
uint16_t | mtu | ||
) |
Handle for the mtu exchange event.
[in] | conn_idx | Connection index. |
[in] | mtu | exchange mtu value. |
void ras_proc_disabled_handler | ( | uint8_t | conn_idx, |
uint8_t | cfg_id | ||
) |
Set cache data information.
[in] | conn_idx | Connection index. |
[in] | cfg_id | Procedure configure id. |
void ras_rcv_subevt_data_handler | ( | uint8_t | conn_idx, |
uint8_t * | p_data | ||
) |
Handle for receiving subevt data.
[in] | conn_idx | Connection index. |
[in] | p_data | Pointer to the data buffer. |
sdk_err_t ras_service_init | ( | uint32_t | features | ) |
Initialize Ranging Service.
[in] | features | Ranging Service support features, bit mask ras_fea_bit_mask_t. |
void ras_set_cache_data_info | ( | uint8_t | conn_idx, |
uint8_t | cfg_id, | ||
uint8_t | proc_num, | ||
uint8_t | subevt_num | ||
) |
Set cache data information.
[in] | conn_idx | Connection index. |
[in] | cfg_id | Procedure configure id. |
[in] | proc_num | Procedure number need to cache. |
[in] | subevt_num | Subevent number for per procedure. |