| | |
| | | /* |
| | | * Copyright (c) 2019-2023 Beijing Hanwei Innovation Technology Ltd. Co. and |
| | | * Copyright (c) 2019-2025 Beijing Hanwei Innovation Technology Ltd. Co. and |
| | | * its subsidiaries and affiliates (collectly called MKSEMI). |
| | | * |
| | | * All rights reserved. |
| | |
| | | #ifndef RANGING_H_ |
| | | #define RANGING_H_ |
| | | #include "ranging_custom_task.h" |
| | | #include "wsf_timer.h" |
| | | #include "mk_timer_list.h" |
| | | #include "mk_mac.h" |
| | | #include "uwb_api.h" |
| | | #include "lib_ranging.h" |
| | |
| | | #endif |
| | | |
| | | #ifndef RANGING_FOM_FILTER_EN |
| | | // depends on CHEST_DUMP_EN |
| | | #define RANGING_FOM_FILTER_EN (1) |
| | | #define RANGING_FOM_FILTER_EN (0) |
| | | #endif |
| | | |
| | | #if RANGING_FOM_FILTER_EN |
| | |
| | | { |
| | | wsfQueue_t msg_queue; |
| | | wsfHandlerId_t handle_id; |
| | | wsfTimer_t daemon_timer; |
| | | mk_timer_t daemon_timer; |
| | | }; |
| | | |
| | | #ifdef __cplusplus |
| | |
| | | * @return 0: successful, 1: fail |
| | | */ |
| | | uint8_t ranging_response_msg_set(uint16_t data_len, const uint8_t *data); |
| | | |
| | | /** |
| | | * @brief Calculate timestamp difference. |
| | | * @param[in] ts_a Ranging timestamp a |
| | | * @param[in] ts_b Ranging timestamp b |
| | | * @return ts_a - ts_b |
| | | */ |
| | | int64_t ranging_timestamp_diff(int64_t ts_a, int64_t ts_b); |
| | | |
| | | /** |
| | | * @brief Calculate ranging Tround. |