1 /* 2 * Copyright (c) 2018-2019 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /* Range Delay 8 * Refer to BT Spec v5.1 Vol.6, Part B, Section 4.2.3 Range Delay 9 * "4 / 1000" is an approximation of the propagation time in us of the 10 * signal to travel 1 meter. 11 */ 12 #define RANGE_DISTANCE 1000 /* meters */ 13 #define RANGE_DELAY_US (2 * RANGE_DISTANCE * 4 / 1000) 14 addr_us_get(uint8_t phy)15static inline uint32_t addr_us_get(uint8_t phy) 16 { 17 switch (phy) { 18 default: 19 case BIT(0): 20 return 40; 21 case BIT(1): 22 return 24; 23 case BIT(2): 24 return 376; 25 } 26 } 27