ras.h File Reference

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.

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...
 

Detailed Description

Ranging Service API.

Attention
#####Copyright (c) 2024 GOODIX All rigras reserved.

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.

Function Documentation

◆ ras_connect_handler()

void ras_connect_handler ( uint8_t  conn_idx)

Handle for the connection event.

Parameters
[in]conn_idxConnection index.

◆ ras_disconnect_handler()

void ras_disconnect_handler ( uint8_t  conn_idx)

Handle for the disconnection event.

Parameters
[in]conn_idxConnection index.

◆ ras_mtu_exch_handler()

void ras_mtu_exch_handler ( uint8_t  conn_idx,
uint16_t  mtu 
)

Handle for the mtu exchange event.

Parameters
[in]conn_idxConnection index.
[in]mtuexchange mtu value.

◆ ras_rcv_subevt_data_handler()

void ras_rcv_subevt_data_handler ( uint8_t  conn_idx,
uint8_t *  p_data 
)

Handle for receiving subevt data.

Parameters
[in]conn_idxConnection index.
[in]p_dataPointer to the data buffer.

◆ ras_service_init()

sdk_err_t ras_service_init ( uint32_t  features)

Initialize Ranging Service.

Parameters
[in]featuresRanging Service support features, bit mask ras_fea_bit_mask_t.
Returns
Result of service initialization.