Home
last modified time | relevance | path

Searched +full:- +full:exponent (Results 1 – 25 of 31) sorted by relevance

12

/Zephyr-latest/lib/libc/minimal/source/math/
Dsqrt.c4 * SPDX-License-Identifier: Apache-2.0
26 int64_t exponent; in sqrt() local
37 return (square - square) / (square - square); in sqrt()
41 * we can do this by dividing the exponent part of the float by 2 in sqrt()
42 * this assumes IEEE-754 format doubles in sqrt()
44 exponent = ((p_square.i & EXP_MASK64) >> 52) - 1023; in sqrt()
45 if (exponent == 0x7FF - 1023) { in sqrt()
49 exponent /= 2; in sqrt()
50 root.i = (p_square.i & ~EXP_MASK64) | (exponent + 1023) << 52; in sqrt()
55 /* if (llabs(*p_root-*p_last)<MAX_D_ERROR_COUNT) */ in sqrt()
Dsqrtf.c4 * SPDX-License-Identifier: Apache-2.0
26 int32_t exponent; in sqrtf() local
37 return (square - square) / (square - square); in sqrtf()
41 * we can do this by dividing the exponent part of the float by 2 in sqrtf()
42 * this assumes IEEE-754 format doubles in sqrtf()
44 exponent = ((p_square.i & EXP_MASK32) >> 23) - 127; in sqrtf()
45 if (exponent == 0xFF - 127) { in sqrtf()
49 exponent /= 2; in sqrtf()
50 root.i = (p_square.i & ~EXP_MASK32) | (exponent + 127) << 23; in sqrtf()
55 /* if (labs(*p_root - *p_last) < MAX_F_ERROR_COUNT) */ in sqrtf()
/Zephyr-latest/subsys/net/l2/ieee802154/
DKconfig.radio2 # SPDX-License-Identifier: Apache-2.0
10 TX power in dbm. Valid setting are: -18, -7, -4, -2, 0, 1, 2, 3, 5
18 Number of re-transmission attempts radio driver should do, before
29 bool "IEEE 802.15.4 unslotted CSMA-CA medium access protocol"
31 Use CSMA-CA mechanism (listen-before-talk with exponential backoff)
33 channel access and fits most usage scenarios (see IEEE 802.15.4-2020,
41 and fits low duty-cycle contexts where the radio spectrum is not
42 too heavily loaded (see IEEE 802.15.4-2020, section 10.2.8). The
54 The maximum number of backoffs the CSMA-CA algorithm will attempt
59 int "CSMA MAC minimum backoff exponent"
[all …]
Dieee802154_radio_csma_ca.c4 * SPDX-License-Identifier: Apache-2.0
6 * All references to the spec refer to IEEE 802.15.4-2020.
26 "The CSMA/CA min backoff exponent must be less or equal max backoff exponent.");
37 iface, ctx->channel, in unslotted_csma_ca_channel_access()
45 uint8_t bo_n = sys_rand32_get() & ((1 << be) - 1); in unslotted_csma_ca_channel_access()
56 /* Channel is idle -> CSMA Success */ in unslotted_csma_ca_channel_access()
58 } else if (ret != -EBUSY) { in unslotted_csma_ca_channel_access()
59 /* CCA exited with failure code -> CSMA Abort */ in unslotted_csma_ca_channel_access()
60 return -EIO; in unslotted_csma_ca_channel_access()
63 /* Channel is busy -> CSMA Backoff */ in unslotted_csma_ca_channel_access()
[all …]
/Zephyr-latest/tests/lib/c_lib/common/src/
Dtest_sqrt.c4 * SPDX-License-Identifier: Apache-2.0
13 #define local_abs(x) (((x) < 0) ? -(x) : (x))
86 #define MAX_FLOAT_ERROR_PERCENT (3.5e-5f)
87 #define MAX_DOUBLE_ERROR_PERCENT (4.5e-14)
92 float exponent, resf, square, root_squared, error; in ZTEST() local
101 /* test the special cases of 0.0, NAN, -NAN, INFINITY, -INFINITY, and -10.0 */ in ZTEST()
108 zassert_true(isnanf(sqrtf(-NAN)), "isnanf(sqrtf(-nan))"); in ZTEST()
110 zassert_true(isnanf(sqrtf(-INFINITY)), "isnanf(sqrt(-inf))"); in ZTEST()
111 zassert_true(isnanf(sqrtf(-10.0f)), "isnanf(sqrt(-10.0))"); in ZTEST()
113 for (exponent = 1.0e-10f; exponent < 1.0e10f; exponent *= 10.0f) { in ZTEST()
[all …]
/Zephyr-latest/drivers/ieee802154/
DKconfig.cc13xx_cc26xx4 # SPDX-License-Identifier: Apache-2.0
35 The maximum number of backoffs the CSMA-CA algorithm will attempt
39 int "CSMA MAC minimum backoff exponent"
44 The minimum value of the backoff exponent (BE) in the CSMA-CA
48 int "CSMA MAC maximum backoff exponent"
53 The maximum value of the backoff exponent (BE) in the CSMA-CA
74 default -80 # Based on SUN FSK, 200 kHz bit rate, no FEC, see IEEE 802.15.4-2020, section 19.6.7
78 algorithm. Except for the SUN O-QPSK PHY, the ED threshold
81 or in accordance with local regulations (see IEEE 802.15.4-2020,
82 section 10.2.8). For the SUN O-QPSK PHY, the ED threshold shall
[all …]
/Zephyr-latest/dts/bindings/clock/
Dlitex,clkout.yaml2 # SPDX-License-Identifier: Apache-2.0
13 "#clock-cells":
22 clock-output-names:
28 litex,clock-frequency:
34 litex,clock-phase:
40 litex,clock-duty-num:
46 litex,clock-duty-den:
52 litex,clock-margin:
58 litex,clock-margin-exp:
62 exponent for clkout margin
[all …]
/Zephyr-latest/samples/bluetooth/peripheral_ht/src/
Dhts.c9 * SPDX-License-Identifier: Apache-2.0
73 temp_dev->name); in hts_init()
86 uint8_t exponent; in hts_indicate() local
119 exponent = (uint8_t)-2; in hts_indicate()
123 htm[4] = exponent; in hts_indicate()
/Zephyr-latest/drivers/sensor/ti/opt3001/
Dopt3001.c4 * SPDX-License-Identifier: Apache-2.0
22 const struct opt3001_config *config = dev->config; in opt3001_reg_read()
25 if (i2c_burst_read_dt(&config->i2c, reg, value, 2) != 0) { in opt3001_reg_read()
26 return -EIO; in opt3001_reg_read()
37 const struct opt3001_config *config = dev->config; in opt3001_reg_write()
45 return i2c_write_dt(&config->i2c, tx_buf, sizeof(tx_buf)); in opt3001_reg_write()
55 return -EIO; in opt3001_reg_update()
67 struct opt3001_data *drv_data = dev->data; in opt3001_sample_fetch()
72 drv_data->sample = 0U; in opt3001_sample_fetch()
75 return -EIO; in opt3001_sample_fetch()
[all …]
/Zephyr-latest/dts/bindings/timer/
Dnuclei,systimer.yaml2 # SPDX-License-Identifier: Apache-2.0
7 The Nuclei system timer provides RISC-V privileged mtime and mtimecmp
21 clk-divider:
24 clk-divider specifies the division ratio to the CPU frequency that
35 clock-frequency = <108000000>;
37 This property takes exponent of the power of 2.
44 Setting clk-divider to 2 specifies the system timer uses the clock
48 dt-bindings/timer/nuclei-systimer.h header file.
/Zephyr-latest/samples/bluetooth/central_ht/src/
Dmain.c1 /* main.c - Application main entry point */
6 * SPDX-License-Identifier: Apache-2.0
35 y = -y; in pow()
36 while (y--) { in pow()
40 while (y--) { in pow()
54 int8_t exponent; in notify_func() local
58 params->value_handle = 0U; in notify_func()
64 exponent = ((uint8_t *)data)[4]; in notify_func()
65 temperature = (double)mantissa * pow(10, exponent); in notify_func()
84 printk("[ATTRIBUTE] handle %u\n", attr->handle); in discover_func()
[all …]
/Zephyr-latest/drivers/sensor/maxim/max44009/
Dmax44009.c4 * SPDX-License-Identifier: Apache-2.0
22 const struct max44009_config *config = dev->config; in max44009_reg_read()
40 if (i2c_transfer_dt(&config->i2c, msgs, 2) != 0) { in max44009_reg_read()
41 return -EIO; in max44009_reg_read()
50 const struct max44009_config *config = dev->config; in max44009_reg_write()
53 return i2c_write_dt(&config->i2c, tx_buf, sizeof(tx_buf)); in max44009_reg_write()
63 return -EIO; in max44009_reg_update()
81 return -ENOTSUP; in max44009_attr_set()
87 cr = val->val1 * 1000 + val->val2 / 1000; in max44009_attr_set()
102 return -EIO; in max44009_attr_set()
[all …]
/Zephyr-latest/subsys/net/lib/lwm2m/
Dlwm2m_util.c4 * SPDX-License-Identifier: Apache-2.0
26 int32_t e = -1, v, f = 0; in lwm2m_float_to_b32()
28 int32_t val2 = (*in - (int32_t)*in) * PRECISION32; in lwm2m_float_to_b32()
32 return -EINVAL; in lwm2m_float_to_b32()
64 /* handle -e */ in lwm2m_float_to_b32()
65 e--; in lwm2m_float_to_b32()
68 v -= PRECISION32; in lwm2m_float_to_b32()
69 f |= 1 << (22 - i); in lwm2m_float_to_b32()
79 /* adjust exponent for bias */ in lwm2m_float_to_b32()
91 /* exponent: bits 30-23 */ in lwm2m_float_to_b32()
[all …]
/Zephyr-latest/drivers/wifi/nrf_wifi/inc/
Dwifi_mgmt.h4 * SPDX-License-Identifier: Apache-2.0
27 unsigned char exponent; member
/Zephyr-latest/drivers/wifi/nrf_wifi/src/
Dwifi_mgmt.c4 * SPDX-License-Identifier: Apache-2.0
34 int ret = -1; in nrf_wifi_set_power_save()
42 vif_ctx_zep = dev->data; in nrf_wifi_set_power_save()
49 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_set_power_save()
56 k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER); in nrf_wifi_set_power_save()
57 if (!rpu_ctx_zep->rpu_ctx) { in nrf_wifi_set_power_save()
62 switch (params->type) { in nrf_wifi_set_power_save()
64 if ((params->listen_interval < in nrf_wifi_set_power_save()
66 (params->listen_interval > in nrf_wifi_set_power_save()
68 params->fail_reason = in nrf_wifi_set_power_save()
[all …]
/Zephyr-latest/lib/os/
Dcbprintf_complete.c2 * Copyright (c) 1997-2010, 2012-2015 Wind River Systems, Inc.
5 * SPDX-License-Identifier: Apache-2.0
44 * leading 0, a dot, and an exponent in the form e+xxx for a total of
113 #define WCHAR_IS_SIGNED ((WCHAR_MIN - 0) != 0)
196 /** Left-justify value in width */
202 /** Space for non-negative sign */
226 * prec_value is set to the value of a non-negative argument.
254 /** Set for floating point values that have a non-zero
279 * For example for zero-padded hexadecimal integers
313 * unconsumed character. There must be at least one non-digit character in
[all …]
/Zephyr-latest/drivers/flash/
Dflash_andes_qspi.c4 * SPDX-License-Identifier: Apache-2.0
93 const struct flash_andes_qspi_data *dev_data = dev->data; in dev_erase_types()
95 return dev_data->erase_types; in dev_erase_types()
102 const struct flash_andes_qspi_data *dev_data = dev->data; in dev_flash_size()
104 return dev_data->flash_size; in dev_flash_size()
106 const struct flash_andes_qspi_config *config = dev->config; in dev_flash_size()
108 return config->flash_size; in dev_flash_size()
115 const struct flash_andes_qspi_data *dev_data = dev->data; in dev_page_size()
117 return dev_data->page_size; in dev_page_size()
135 struct flash_andes_qspi_data *dev_data = dev->data; in flash_andes_qspi_access()
[all …]
Djesd216.c4 * SPDX-License-Identifier: Apache-2.0
19 res->instr = packed >> 8; in extract_instr()
20 res->mode_clocks = (packed >> 5) & 0x07; in extract_instr()
21 res->wait_states = packed & 0x1F; in extract_instr()
31 int rv = -ENOTSUP; in jesd216_bfp_read_support()
35 if ((php->len_dw >= 15) in jesd216_bfp_read_support()
36 && (sys_le32_to_cpu(bfp->dw10[5]) & BIT(9))) { in jesd216_bfp_read_support()
41 if ((php->len_dw >= 19) in jesd216_bfp_read_support()
42 && (sys_le32_to_cpu(bfp->dw10[9]) & BIT(9))) { in jesd216_bfp_read_support()
50 if (sys_le32_to_cpu(bfp->dw1) & BIT(16)) { in jesd216_bfp_read_support()
[all …]
/Zephyr-latest/tests/lib/sprintf/src/
Dmain.c1 /* test_sprintf.c - test various sprintf functionality */
4 * Copyright (c) 2013-2014 Wind River Systems, Inc.
6 * SPDX-License-Identifier: Apache-2.0
20 * @brief Test implementation-defined constants library
34 #define DEADBEEF_SIGNED_STR "-559038737"
71 uint32_t exponent; member
78 uint32_t exponent; member
121 var.exponent = 0x00000000; in ZTEST()
125 "sprintf(inf) - incorrect output '%s'\n", buffer); in ZTEST()
129 "sprintf(INF) - incorrect output '%s'\n", buffer); in ZTEST()
[all …]
/Zephyr-latest/drivers/watchdog/
Dwdt_wwdg_stm32.c4 * SPDX-License-Identifier: Apache-2.0
54 * - t_WWDG: WWDG timeout
55 * - counter: a value in [0x40, 0x7F] representing the cycles before timeout.
59 * - f_WWDG: the frequency of the WWDG clock. This can be calculated by the
63 * - f_PCLK: the clock frequency of the system
64 * - 4096: the constant internal divider
65 * - prescaler: the programmable divider with valid values of 1, 2, 4 or 8,
69 * - counter = 0x40
70 * - prescaler = 1
72 * - counter = 0x7F
[all …]
Dwdt_wwdgt_gd32.c4 * SPDX-License-Identifier: Apache-2.0
43 * @param exp exponent part of prescaler
49 * count = (timeout * pclk / INTERNAL_DIVIDER * (2^prescaler_exp) ) - 1
56 const struct gd32_wwdgt_config *config = dev->config; in gd32_wwdgt_calc_ticks()
60 (clock_control_subsys_t)&config->clkid, in gd32_wwdgt_calc_ticks()
64 / (WWDGT_INTERNAL_DIVIDER * (1 << exp) * MSEC_PER_SEC) - 1) in gd32_wwdgt_calc_ticks()
76 * @return 0 on success, -EINVAL if the window-max is out of range
84 uint32_t max_count = gd32_wwdgt_calc_ticks(dev, win->max, shift); in gd32_wwdgt_calc_window()
89 if (win->min == 0U) { in gd32_wwdgt_calc_window()
92 *wval = gd32_wwdgt_calc_ticks(dev, win->min, shift); in gd32_wwdgt_calc_window()
[all …]
/Zephyr-latest/subsys/bluetooth/services/bas/
Dbas.c10 * SPDX-License-Identifier: Apache-2.0
65 * https://www.bluetooth.com/wp-content/uploads/Files/Specification/Assigned_Numbers.pdf?id=89
69 .exponent = 0x0,
118 return -EINVAL; in bt_bas_set_battery_level()
129 return rc == -ENOTCONN ? 0 : rc; in bt_bas_set_battery_level()
/Zephyr-latest/drivers/dai/intel/dmic/
Ddmic.c4 * SPDX-License-Identifier: Apache-2.0
33 /* Helper macro to read 64-bit data using two 32-bit data read */
39 /* Exponent function for small values of x. This function calculates
40 * fairly accurately exponent for x in range -2.0 .. +2.0. The iteration
41 * uses first 11 terms of Taylor series approximation for exponent
61 p = num * x; /* Q9.23 x Q3.29 -> Q12.52 */ in exp_small_fixed()
79 if (x < Q_CONVERT_FLOAT(-11.5, 27)) { in exp_fixed()
110 if (db < Q_CONVERT_FLOAT(-100.0, 24)) { in db2lin_fixed()
122 uint32_t dest = dmic->reg_base + reg; in dai_dmic_update_bits()
130 sys_write32(val, dmic->reg_base + reg); in dai_dmic_write()
[all …]
/Zephyr-latest/subsys/net/l2/wifi/
Dwifi_shell.c5 * SPDX-License-Identifier: Apache-2.0
45 #include <wifi_enterprise_test_certs/client-key.pem.inc>
58 #include <wifi_enterprise_test_certs/client-key2.pem.inc>
67 #include <wifi_enterprise_test_certs/server-key.pem.inc>
143 return -1; in cmd_wifi_set_enterprise_creds()
171 PR_WARNING("%s value out of range: %s, (%ld-%ld)\n", in parse_number()
174 PR_WARNING("Value out of range: %s, (%ld-%ld)\n", in parse_number()
186 (const struct wifi_scan_result *)cb->info; in handle_wifi_scan_result()
194 PR("\n%-4s | %-32s %-5s | %-13s | %-4s | %-15s | %-17s | %-8s\n", in handle_wifi_scan_result()
198 strncpy(ssid_print, entry->ssid, sizeof(ssid_print) - 1); in handle_wifi_scan_result()
[all …]
/Zephyr-latest/drivers/sensor/bosch/bmp388/
Dbmp388.c5 * SPDX-License-Identifier: Apache-2.0
8 * https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp388-ds001.pdf
29 { 0, 3 }, /* 25/8192 - 327.68s */
30 { 0, 6 }, /* 25/4096 - 163.84s */
31 { 0, 12 }, /* 25/2048 - 81.92s */
32 { 0, 24 }, /* 25/1024 - 40.96s */
33 { 0, 49 }, /* 25/512 - 20.48s */
34 { 0, 98 }, /* 25/256 - 10.24s */
35 { 0, 195 }, /* 25/128 - 5.12s */
36 { 0, 391 }, /* 25/64 - 2.56s */
[all …]

12