/Zephyr-latest/include/zephyr/dt-bindings/pinctrl/renesas/ |
D | pinctrl-rcar-common.h | 16 * @param shift the bit shift for this alternate function. 20 * Function shift [ 4 : 8 ] 25 #define IPSR(bank, shift, func) (((bank) << 10U) | ((shift) << 4U) | (func)) argument 49 #define IPnSR(bank, reg, shift, func) \ argument 50 IPSR(((reg) << 5U) | (bank), shift, func) 52 #define IP0SR0(shift, func) IPnSR(0, 0, shift, func) argument 53 #define IP1SR0(shift, func) IPnSR(1, 0, shift, func) argument 54 #define IP2SR0(shift, func) IPnSR(2, 0, shift, func) argument 55 #define IP3SR0(shift, func) IPnSR(3, 0, shift, func) argument 56 #define IP0SR1(shift, func) IPnSR(0, 1, shift, func) argument [all …]
|
/Zephyr-latest/include/zephyr/dsp/ |
D | print_format.h | 32 static inline int64_t ___PRIq_arg_shift(int64_t q, int shift) in ___PRIq_arg_shift() argument 34 if (shift < 0) { in ___PRIq_arg_shift() 35 return llabs(q) >> -shift; in ___PRIq_arg_shift() 37 return llabs(q) << shift; in ___PRIq_arg_shift() 45 #define __PRIq_arg_shift(q, shift) ___PRIq_arg_shift(q, ((shift) + (8 * (4 - (int)sizeof(q))))) argument 46 #define __PRIq_arg_get(q, shift, h, l) FIELD_GET(GENMASK64(h, l), __PRIq_arg_shift(q, shift)) argument 47 #define __PRIq_arg_get_int(q, shift) __PRIq_arg_get(q, shift, 63, 31) argument 48 #define __PRIq_arg_get_frac(q, precision, shift) \ argument 49 ((__PRIq_arg_get(q, shift, 30, 0) * __CONSTPOW(1, precision)) / INT32_MAX) 56 * @param[in] shift The "scale" to shift @p q by [all …]
|
D | utils.h | 26 * @defgroup math_dsp_utils_shifts Float/Fixed point shift conversion functions 33 * Convert number Q7/Q15/Q31 to Float or Double representation with shift. 40 * @brief Convert a Q7 fixed-point value to a floating-point (float32_t) value with a left shift. 43 * @param m The number of bits to left shift the input value (0 to 7). 49 * @brief Convert a Q15 fixed-point value to a floating-point (float32_t) value with a left shift. 52 * @param m The number of bits to left shift the input value (0 to 15). 58 * @brief Convert a Q31 fixed-point value to a floating-point (float32_t) value with a left shift. 61 * @param m The number of bits to left shift the input value (0 to 31). 67 * @brief Convert a Q7 fixed-point value to a floating-point (float64_t) value with a left shift. 70 * @param m The number of bits to left shift the input value (0 to 7). [all …]
|
/Zephyr-latest/tests/subsys/dsp/utils/src/ |
D | f32.c | 31 static void test_shift_f32_to_q7(const float32_t data, const uint32_t shift, in test_shift_f32_to_q7() argument 34 q7_t shifted_data = Z_SHIFT_F32_TO_Q7(data, shift); in test_shift_f32_to_q7() 37 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f32_to_q7() 41 static void test_shift_f32_to_q15(const float32_t data, const uint32_t shift, in test_shift_f32_to_q15() argument 44 q15_t shifted_data = Z_SHIFT_F32_TO_Q15(data, shift); in test_shift_f32_to_q15() 47 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f32_to_q15() 51 static void test_shift_f32_to_q31(const float32_t data, const uint32_t shift, in test_shift_f32_to_q31() argument 54 q31_t shifted_data = Z_SHIFT_F32_TO_Q31(data, shift); in test_shift_f32_to_q31() 57 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f32_to_q31()
|
D | f64.c | 30 static void test_shift_f64_to_q7(const float64_t data, const uint32_t shift, in test_shift_f64_to_q7() argument 33 const q7_t shifted_data = Z_SHIFT_F64_TO_Q7(data, shift); in test_shift_f64_to_q7() 36 "Conversion failed: %f shifted by %d = %d (expected %d)", data, shift, in test_shift_f64_to_q7() 40 static void test_shift_f64_to_q15(const float64_t data, const uint32_t shift, in test_shift_f64_to_q15() argument 43 const q15_t shifted_data = Z_SHIFT_F64_TO_Q15(data, shift); in test_shift_f64_to_q15() 46 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f64_to_q15() 50 static void test_shift_f64_to_q31(const float64_t data, const uint32_t shift, in test_shift_f64_to_q31() argument 53 const q31_t shifted_data = Z_SHIFT_F64_TO_Q31(data, shift); in test_shift_f64_to_q31() 56 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f64_to_q31()
|
D | q15.c | 30 static void test_shift_q15_to_f32(const q15_t data, const uint32_t shift, const float32_t expected) in test_shift_q15_to_f32() argument 32 const float32_t shifted_data = Z_SHIFT_Q15_TO_F32(data, shift); in test_shift_q15_to_f32() 35 "Conversion failed: 0x%08x shifted by %d = %f (expected %f)", data, shift, in test_shift_q15_to_f32() 39 static void test_shift_q15_to_f64(const q15_t data, const uint32_t shift, const float64_t expected) in test_shift_q15_to_f64() argument 41 const float64_t shifted_data = Z_SHIFT_Q15_TO_F64(data, shift); in test_shift_q15_to_f64() 44 "Conversion failed: 0x%08x shifted by %d = %f (expected %f)", data, shift, in test_shift_q15_to_f64()
|
D | q31.c | 31 static void test_shift_q31_to_f32(const q31_t data, const uint32_t shift, const float32_t expected) in test_shift_q31_to_f32() argument 33 const float32_t shifted_data = Z_SHIFT_Q31_TO_F32(data, shift); in test_shift_q31_to_f32() 36 "Conversion failed: 0x%08x shifted by %d = %f (expected %f)", data, shift, in test_shift_q31_to_f32() 40 static void test_shift_q31_to_f64(const q31_t data, const uint32_t shift, const float64_t expected) in test_shift_q31_to_f64() argument 42 const float64_t shifted_data = Z_SHIFT_Q31_TO_F64(data, shift); in test_shift_q31_to_f64() 45 "Conversion failed: 0x%08x shifted by %d = %f (expected %f)", data, shift, in test_shift_q31_to_f64()
|
D | q7.c | 29 static void test_shift_q7_to_f32(const q7_t data, const uint32_t shift, const float32_t expected) in test_shift_q7_to_f32() argument 31 const float32_t shifted_data = Z_SHIFT_Q7_TO_F32(data, shift); in test_shift_q7_to_f32() 34 "Conversion failed: 0x%08x shifted by %d = %f (expected %f)", data, shift, in test_shift_q7_to_f32() 38 static void test_shift_q7_to_f64(const q7_t data, const uint32_t shift, const float64_t expected) in test_shift_q7_to_f64() argument 40 const float64_t shifted_data = Z_SHIFT_Q7_TO_F64(data, shift); in test_shift_q7_to_f64() 43 "Conversion failed: 0x%08x shifted by %d = %f (expected %f)", data, shift, in test_shift_q7_to_f64()
|
/Zephyr-latest/drivers/sensor/tdk/icm42688/ |
D | icm42688_emul.c | 125 * sensitivity and shift. See datasheet section 3.2, table 2. 128 int8_t *shift) in icm42688_emul_get_accel_settings() argument 141 /* shift is based on `fs_g * 9.8` since the final numbers will be in SI units of in icm42688_emul_get_accel_settings() 171 if (shift) { in icm42688_emul_get_accel_settings() 172 *shift = shift_out; in icm42688_emul_get_accel_settings() 181 q31_t *epsilon, int8_t *shift) in icm42688_emul_get_accel_ranges() argument 186 icm42688_emul_get_accel_settings(target, &fs_g, &sensitivity, shift); in icm42688_emul_get_accel_ranges() 189 *epsilon = (3 * SENSOR_G * Q31_SCALE / sensitivity / 1000000LL / 2) >> *shift; in icm42688_emul_get_accel_ranges() 190 *upper = (fs_g * SENSOR_G * Q31_SCALE / 1000000LL) >> *shift; in icm42688_emul_get_accel_ranges() 196 * along with corresponding sensitivity and shift. See datasheet section 3.1, table 1. [all …]
|
D | icm42688_decoder.c | 17 static int icm42688_get_shift(enum sensor_channel channel, int accel_fs, int gyro_fs, int8_t *shift) in icm42688_get_shift() argument 26 *shift = 5; in icm42688_get_shift() 29 *shift = 6; in icm42688_get_shift() 32 *shift = 7; in icm42688_get_shift() 35 *shift = 8; in icm42688_get_shift() 46 *shift = -1; in icm42688_get_shift() 49 *shift = 0; in icm42688_get_shift() 52 *shift = 1; in icm42688_get_shift() 55 *shift = 2; in icm42688_get_shift() 58 *shift = 3; in icm42688_get_shift() [all …]
|
/Zephyr-latest/drivers/sensor/bosch/bma4xx/ |
D | bma4xx_emul.c | 191 void bma4xx_emul_set_accel_data(const struct emul *target, q31_t value, int8_t shift, int8_t reg) in bma4xx_emul_set_accel_data() argument 196 /* floor(9.80665 * 2^(31−4)) q31_t in (-2^4, 2^4) => range_g = shift of 4 */ in bma4xx_emul_set_accel_data() 206 unshifted = shift < 0 ? ((int64_t)value >> -shift) : ((int64_t)value << shift); in bma4xx_emul_set_accel_data() 214 /* lsb register uses top 12 of 16 bits to hold value so shift by 4 to fill it */ in bma4xx_emul_set_accel_data() 220 const q31_t *value, int8_t shift) in bma4xx_emul_backend_set_channel() argument 231 bma4xx_emul_set_accel_data(target, value[0], shift, BMA4XX_REG_DATA_8); in bma4xx_emul_backend_set_channel() 234 bma4xx_emul_set_accel_data(target, value[0], shift, BMA4XX_REG_DATA_10); in bma4xx_emul_backend_set_channel() 237 bma4xx_emul_set_accel_data(target, value[0], shift, BMA4XX_REG_DATA_12); in bma4xx_emul_backend_set_channel() 240 bma4xx_emul_set_accel_data(target, value[0], shift, BMA4XX_REG_DATA_8); in bma4xx_emul_backend_set_channel() 241 bma4xx_emul_set_accel_data(target, value[1], shift, BMA4XX_REG_DATA_10); in bma4xx_emul_backend_set_channel() [all …]
|
/Zephyr-latest/include/zephyr/drivers/ |
D | emul_sensor.h | 31 const q31_t *value, int8_t shift); 34 q31_t *upper, q31_t *epsilon, int8_t *shift); 41 q31_t *increment, int8_t *shift); 65 * @param shift Shift value (scaling factor) applied to \p value 73 int8_t shift) in emul_sensor_backend_set_channel() argument 82 return api->set_channel(target, ch, value, shift); in emul_sensor_backend_set_channel() 97 * @param[out] shift The shift value (scaling factor) associated with \p lower, \p upper, and 106 q31_t *upper, q31_t *epsilon, int8_t *shift) in emul_sensor_backend_get_sample_range() argument 115 return api->get_sample_range(target, ch, lower, upper, epsilon, shift); in emul_sensor_backend_get_sample_range() 160 * @param[out] shift The shift for \p min, \p max, and \p increment [all …]
|
D | sensor_data_types.h | 54 int8_t shift; member 73 PRIq_arg((data_).readings[(readings_offset_)].x, 6, (data_).shift), \ 74 PRIq_arg((data_).readings[(readings_offset_)].y, 6, (data_).shift), \ 75 PRIq_arg((data_).readings[(readings_offset_)].z, 6, (data_).shift) 83 int8_t shift; member 104 PRIq_arg((data_).readings[(readings_offset_)].x, 6, (data_).shift), \ 105 PRIq_arg((data_).readings[(readings_offset_)].y, 6, (data_).shift), \ 106 PRIq_arg((data_).readings[(readings_offset_)].z, 6, (data_).shift), \ 107 PRIq_arg((data_).readings[(readings_offset_)].w, 6, (data_).shift) 126 int8_t shift; member [all …]
|
/Zephyr-latest/drivers/sensor/bosch/bmi160/ |
D | emul_bmi160.c | 89 int shift; in reg_write() local 94 shift = BMI160_PMU_STATUS_ACC_POS; in reg_write() 97 shift = BMI160_PMU_STATUS_GYR_POS; in reg_write() 101 shift = BMI160_PMU_STATUS_MAG_POS; in reg_write() 104 data->pmu_status &= 3 << shift; in reg_write() 105 data->pmu_status |= pmu_val << shift; in reg_write() 288 const q31_t *value, int8_t shift) in bmi160_emul_backend_set_channel() argument 353 if (shift < scale_shift) { in bmi160_emul_backend_set_channel() 355 intermediate >>= scale_shift - shift; in bmi160_emul_backend_set_channel() 356 } else if (shift > 0 && shift > scale_shift) { in bmi160_emul_backend_set_channel() [all …]
|
/Zephyr-latest/tests/drivers/build_all/sensor/src/ |
D | generic_test.c | 113 int8_t shift; in run_generic_test() local 117 &channel_table[ch].epsilon, &shift) == 0) { in run_generic_test() 121 LOG_INF("CH %d: lower=%d, upper=%d, eps=%d, shift=%d", ch, lower, upper, in run_generic_test() 122 channel_table[ch].epsilon, shift); in run_generic_test() 131 channel_table[ch].expected_value_shift = shift; in run_generic_test() 218 int8_t shift; in run_generic_test() local 226 shift = decoded_data.three_axis.shift; in run_generic_test() 232 shift = decoded_data.three_axis.shift; in run_generic_test() 238 shift = decoded_data.three_axis.shift; in run_generic_test() 244 shift = decoded_data.q31.shift; in run_generic_test() [all …]
|
/Zephyr-latest/drivers/gpio/ |
D | gpio_bcm2711.c | 73 uint32_t shift; in gpio_bcm2711_pin_configure() local 83 shift = GPIO_REG_SHIFT(RPI_PIN_NUM(port, pin), FSEL_GROUPS, FSEL_BITS); in gpio_bcm2711_pin_configure() 86 regval &= ~(BIT_MASK(FSEL_BITS) << shift); in gpio_bcm2711_pin_configure() 88 regval |= (FSEL_OUTPUT << shift); in gpio_bcm2711_pin_configure() 96 shift = GPIO_REG_SHIFT(RPI_PIN_NUM(port, pin), IO_GROUPS, IO_BITS); in gpio_bcm2711_pin_configure() 100 regval |= BIT(shift); in gpio_bcm2711_pin_configure() 104 regval |= BIT(shift); in gpio_bcm2711_pin_configure() 112 shift = GPIO_REG_SHIFT(RPI_PIN_NUM(port, pin), PULL_GROUPS, PULL_BITS); in gpio_bcm2711_pin_configure() 115 regval &= ~(BIT_MASK(PULL_BITS) << shift); in gpio_bcm2711_pin_configure() 117 regval |= (PULL_UP << shift); in gpio_bcm2711_pin_configure() [all …]
|
/Zephyr-latest/subsys/bluetooth/mesh/ |
D | rpl.c | 240 int shift = 0; in bt_mesh_rpl_reset() local 250 shift++; in bt_mesh_rpl_reset() 254 if (shift > 0) { in bt_mesh_rpl_reset() 255 replay_list[i - shift] = *rpl; in bt_mesh_rpl_reset() 263 (void)memset(&replay_list[last - shift + 1], 0, sizeof(struct bt_mesh_rpl) * shift); in bt_mesh_rpl_reset() 346 int shift = 0; in bt_mesh_rpl_pending_store() local 373 shift++; in bt_mesh_rpl_pending_store() 375 if (shift > 0) { in bt_mesh_rpl_pending_store() 376 replay_list[i - shift] = *rpl; in bt_mesh_rpl_pending_store() 379 store_rpl(&replay_list[i - shift]); in bt_mesh_rpl_pending_store() [all …]
|
/Zephyr-latest/drivers/sensor/st/lsm6dsv16x/ |
D | lsm6dsv16x_decoder.c | 342 out->shift = accel_range[header->accel_fs]; in lsm6dsv16x_decode_fifo() 344 out->readings[count].x = Q31_SHIFT_MICROVAL(scale * x, out->shift); in lsm6dsv16x_decode_fifo() 345 out->readings[count].y = Q31_SHIFT_MICROVAL(scale * y, out->shift); in lsm6dsv16x_decode_fifo() 346 out->readings[count].z = Q31_SHIFT_MICROVAL(scale * z, out->shift); in lsm6dsv16x_decode_fifo() 373 out->shift = gyro_range[header->gyro_fs]; in lsm6dsv16x_decode_fifo() 375 out->readings[count].x = Q31_SHIFT_MICROVAL(scale * x, out->shift); in lsm6dsv16x_decode_fifo() 376 out->readings[count].y = Q31_SHIFT_MICROVAL(scale * y, out->shift); in lsm6dsv16x_decode_fifo() 377 out->readings[count].z = Q31_SHIFT_MICROVAL(scale * z, out->shift); in lsm6dsv16x_decode_fifo() 404 out->shift = temp_range; in lsm6dsv16x_decode_fifo() 406 out->readings[count].temperature = Q31_SHIFT_MICROVAL(t_uC, out->shift); in lsm6dsv16x_decode_fifo() [all …]
|
/Zephyr-latest/dts/arm64/ti/ |
D | ti_am62x_a53.dtsi | 67 reg-shift = <2>; 78 reg-shift = <2>; 89 reg-shift = <2>; 100 reg-shift = <2>; 111 reg-shift = <2>; 122 reg-shift = <2>; 133 reg-shift = <2>;
|
/Zephyr-latest/samples/drivers/virtualization/ivshmem/doorbell/ |
D | write_shared_memory.sh | 46 shift 50 shift 57 shift 71 shift
|
/Zephyr-latest/tests/bsim/bluetooth/mesh/ |
D | _mesh_test.sh | 27 shift 1 35 shift 1 47 shift 1 88 shift 1 103 shift 1
|
/Zephyr-latest/drivers/sensor/asahi_kasei/akm09918c/ |
D | akm09918c_emul.c | 137 const q31_t *value, int8_t shift) in akm09918c_emul_backend_set_channel() argument 166 (shift < 0 ? ((int64_t)*value >> -shift) : ((int64_t)*value << shift)) * 1000000 / in akm09918c_emul_backend_set_channel() 182 q31_t *upper, q31_t *epsilon, int8_t *shift) in akm09918c_emul_backend_get_sample_range() argument 186 if (!lower || !upper || !epsilon || !shift) { in akm09918c_emul_backend_get_sample_range() 195 *shift = 6; in akm09918c_emul_backend_get_sample_range() 196 *upper = (int64_t)(49.12 * ((int64_t)INT32_MAX + 1)) >> *shift; in akm09918c_emul_backend_get_sample_range() 198 *epsilon = (int64_t)(0.0015 * ((int64_t)INT32_MAX + 1)) >> *shift; in akm09918c_emul_backend_get_sample_range()
|
/Zephyr-latest/include/zephyr/dt-bindings/clock/ |
D | stm32l1_clock.h | 42 * - shift (0..31) [ 8 : 12 ] 47 * @param shift Position within RCC_CCIPRx. 51 #define STM32_DOMAIN_CLOCK(val, mask, shift, reg) \ argument 53 (((shift) & STM32_CLOCK_SHIFT_MASK) << STM32_CLOCK_SHIFT_SHIFT) | \
|
D | stm32_common_clocks.h | 37 * @param shift Position of field within RCC register (= field LSB's index) 42 * @note 'shift' range: 0~63 [ 16 : 21 ] 47 #define STM32_MCO_CFGR(val, mask, shift, reg) \ argument 49 (((shift) & STM32_MCO_CFGR_SHIFT_MASK) << STM32_MCO_CFGR_SHIFT_SHIFT) | \
|
/Zephyr-latest/tests/lib/cmsis_dsp/fastmath/src/ |
D | q15.c | 123 uint16_t *shift; in ZTEST() local 129 shift = malloc(length * sizeof(uint16_t)); in ZTEST() 130 zassert_not_null(shift, ASSERT_MSG_BUFFER_ALLOC_FAILED); in ZTEST() 136 &output[index], &shift[index]); in ZTEST() 150 memcmp(shift, ref_divide_shift, in ZTEST() 156 free(shift); in ZTEST()
|