Ranging Service Adaptor. More...
Go to the source code of this file.
Classes | |
struct | ras_ad_send_nti_ind_cmp_info_t |
Event parameter for RAS_AD_EVT_SEND_NTI_IND_CMP. More... | |
struct | ras_ad_set_cccd_info_t |
Event parameter for set cccd. More... | |
struct | ras_ad_evt_t |
Raning Service Adaptor event. More... | |
Macros | |
#define | RAS_AD_FEA_MAX_LEN 4 |
#define | RAS_AD_DATA_MAX_LEN 244 |
#define | RAS_AD_CP_MAX_LEN 5 |
#define | RAS_AD_DATA_READY_MAX_LEN 2 |
#define | RAS_AD_DATA_OW_MAX_LEN 2 |
Typedefs | |
typedef void(* | ras_ad_evt_handler_t) (ras_ad_evt_t *p_evt) |
Ranging Service event handler type. More... | |
Enumerations | |
enum | ras_ad_attr_idx_t { RAS_AD_IDX_SVC, RAS_AD_IDX_FEA_CHAR, RAS_AD_IDX_FEA_VAL, RAS_AD_IDX_RT_DATA_CHAR, RAS_AD_IDX_RT_DATA_VAL, RAS_AD_IDX_RT_DATA_CCCD_CFG, RAS_AD_IDX_OD_DATA_CHAR, RAS_AD_IDX_OD_DATA_VAL, RAS_AD_IDX_OD_DATA_CCCD_CFG, RAS_AD_IDX_CP_CHAR, RAS_AD_IDX_CP_VAL, RAS_AD_IDX_CP_CCCD_CFG, RAS_AD_IDX_DATA_READY_CHAR, RAS_AD_IDX_DATA_READY_VAL, RAS_AD_IDX_DATA_READY_CCCD_CFG, RAS_AD_IDX_DATA_OW_CHAR, RAS_AD_IDX_DATA_OW_VAL, RAS_AD_IDX_DATA_OW_CCCD_CFG, RAS_AD_IDX_NB } |
Ranging Service Adaptor Attributes Indexes. More... | |
enum | ras_ad_evt_type_t { RAS_AD_EVT_INVALID, RAS_AD_EVT_SET_RT_DATA_CCCD, RAS_AD_EVT_SET_OD_DATA_CCCD, RAS_AD_EVT_SET_CP_CCCD, RAS_AD_EVT_SET_DATA_READY_CCCD, RAS_AD_EVT_SET_DATA_OW_CCCD, RAS_AD_EVT_WRITE_CP, RAS_AD_EVT_SEND_NTI_IND_CMP } |
Ranging Service Adaptor event types. More... | |
enum | ras_ad_send_data_type_t { RAS_AD_SEND_DATA_TYPE_INVALID, RAS_AD_SEND_DATA_TYPE_NOTIFY, RAS_AD_SEND_DATA_TYPE_INDICATE } |
The type for sending data. More... | |
Functions | |
sdk_err_t | ras_ad_init (ras_ad_evt_handler_t evt_handler, uint32_t features) |
Initialize Ranging Service Adaptor instances and add to the DB. More... | |
sdk_err_t | ras_ad_send_noti_ind (uint8_t conn_idx, uint8_t type, uint8_t att_idx, uint16_t data_len, uint8_t *p_data) |
Send notification or indication. More... | |
Ranging Service Adaptor.
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_ad.h.
#define RAS_AD_CP_MAX_LEN 5 |
#define RAS_AD_DATA_MAX_LEN 244 |
#define RAS_AD_DATA_OW_MAX_LEN 2 |
#define RAS_AD_DATA_READY_MAX_LEN 2 |
#define RAS_AD_FEA_MAX_LEN 4 |
typedef void(* ras_ad_evt_handler_t) (ras_ad_evt_t *p_evt) |
enum ras_ad_attr_idx_t |
Ranging Service Adaptor Attributes Indexes.
enum ras_ad_evt_type_t |
Ranging Service Adaptor event types.
sdk_err_t ras_ad_init | ( | ras_ad_evt_handler_t | evt_handler, |
uint32_t | features | ||
) |
Initialize Ranging Service Adaptor instances and add to the DB.
[in] | evt_handler | Event handler for the gatt operation. |
[in] | features | Features to support. |
sdk_err_t ras_ad_send_noti_ind | ( | uint8_t | conn_idx, |
uint8_t | type, | ||
uint8_t | att_idx, | ||
uint16_t | data_len, | ||
uint8_t * | p_data | ||
) |
Send notification or indication.
[in] | conn_idx | Connection index. |
[in] | type | Type for sending data, ras_ad_send_data_type_t. |
[in] | att_idx | Attribute index, ras_ad_attr_idx_t. |
[in] | data_len | Data length. |
[in] | p_data | Pointer to the data. |