/Zephyr-latest/dts/bindings/sensor/ |
D | ti,ina23x-common.yaml | 4 # SPDX-License-Identifier: Apache-2.0 7 include: [sensor-device.yaml, i2c-device.yaml] 10 current-lsb-microamps: 17 current-lsb(A) = maximum expected current(A) / 2^15 19 (sensor has 15 bits). For example, if maximum expected current is 15A: 21 current-lsb(A) = 15A / 2^15 ~= 457uA 23 Rounded values may be used for convenience, e.g. 500uA/LSB or 1mA/LSB 24 while keeping a good measurement resolution. The units are in uA/LSB 27 rshunt-micro-ohms: 32 alert-gpios: [all …]
|
D | ti,ina226.yaml | 2 # SPDX-License-Identifier: Apache-2.0 5 TI INA226 Bidirectional Current and Power Monitor. 6 The <zephyr/dt-bindings/sensor/ina226.h> file should be included in the 12 include: [sensor-device.yaml, i2c-device.yaml] 15 avg-count: 19 Default is the power-on reset value. 23 vbus-conversion-time-us: 27 Default is the power-on reset value. 31 vshunt-conversion-time-us: 35 Default is the power-on reset value. [all …]
|
D | ti,ina219.yaml | 2 # SPDX-License-Identifier: Apache-2.0 4 description: Texas Instruments Bidirectional Current/Power Sensor 8 include: [sensor-device.yaml, i2c-device.yaml] 11 lsb-microamp: 15 Current LSB in microAmpere 16 Current LSB = max expected current [A] / 2^15 17 example: 100 -> ~3A 18 shunt-milliohm: 31 The default of 32V is the power-on reset value of the device. 35 - 0 [all …]
|
D | st,lis2dw12-common.yaml | 2 # SPDX-License-Identifier: Apache-2.0 9 #include <zephyr/dt-bindings/sensor/lis2dw12.h> 14 wakeup-duration = <LIS2DW12_DT_WAKEUP_4_ODR>; 15 ff-threshold = <LIS2DW12_DT_FF_THRESHOLD_500_mg>; 16 tap-mode = <LIS2DW12_DT_SINGLE_DOUBLE_TAP>; 17 power-mode = <LIS2DW12_DT_HP_MODE>; 18 bw-filt = <LIS2DW12_DT_FILTER_BW_ODR_DIV_2>; 21 include: sensor-device.yaml 24 irq-gpios: 25 type: phandle-array [all …]
|
/Zephyr-latest/tests/drivers/sensor/ina237/boards/ |
D | native_sim.overlay | 2 * SPDX-License-Identifier: Apache-2.0 5 #include <zephyr/dt-bindings/sensor/ina237.h> 14 rshunt-micro-ohms = <400>; 15 current-lsb-microamps = <123>; 23 high-precision; 24 rshunt-micro-ohms = <400>; 25 current-lsb-microamps = <123>; 29 /* high precision mode, maximum current lsb */ 33 high-precision; 34 rshunt-micro-ohms = <0x00ff>; [all …]
|
/Zephyr-latest/tests/drivers/sensor/ina230/boards/ |
D | native_sim.overlay | 2 * SPDX-License-Identifier: Apache-2.0 5 #include <zephyr/dt-bindings/sensor/ina230.h> 14 rshunt-micro-ohms = <2000>; 15 current-lsb-microamps = <1000>; 22 rshunt-micro-ohms = <2000>; 23 current-lsb-microamps = <1000>;
|
/Zephyr-latest/drivers/sensor/maxim/max30101/ |
D | Kconfig | 4 # SPDX-License-Identifier: Apache-2.0 63 bool "Multi-LED mode" 65 Set to operate in multi-LED mode. The green, red, and/or IR LED 75 Set the ADC's full-scale range. 76 0 = 7.81 pA/LSB 77 1 = 15.63 pA/LSB 78 2 = 31.25 pA/LSB 79 3 = 62.5 pA/LSB 104 Set the pulse amplitude to control the LED1 (red) current. The actual 105 measured LED current for each part can vary significantly due to the [all …]
|
/Zephyr-latest/boards/nordic/nrf5340_audio_dk/ |
D | nrf5340_audio_dk_nrf5340_cpuapp_common.dtsi | 2 * Copyright (c) 2020-2022 Nordic Semiconductor ASA 4 * SPDX-License-Identifier: Apache-2.0 6 #include "nrf5340_audio_dk_nrf5340_cpuapp_common-pinctrl.dtsi" 7 #include <zephyr/dt-bindings/sensor/ina230.h> 12 zephyr,shell-uart = &uart0; 13 zephyr,uart-mcumgr = &uart0; 14 zephyr,bt-mon-uart = &uart0; 15 zephyr,bt-c2h-uart = &uart0; 16 zephyr,bt-hci = &bt_hci_ipc0; 20 gpio_fwd: nrf-gpio-forwarder { [all …]
|
/Zephyr-latest/tests/drivers/sensor/adltc2990/src/ |
D | main.c | 2 * SPDX-FileCopyrightText: Copyright (c) 2023 Carl Zeiss Meditec AG 3 * SPDX-License-Identifier: Apache-2.0 17 zassert_ok(sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_VOLTAGE)); \ 18 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_VOLTAGE, sensor_val)); \ 21 (pin_voltage - 0.01f) * ((r1 + r2) / (float)r2), \ 26 (double)((pin_voltage - 0.01f) * ((r1 + r2) / (float)r2)), \ 31 zassert_ok(sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_CURRENT)); \ 32 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, sensor_val)); \ 35 (pin_voltage - 0.01f) * ADLTC2990_MICROOHM_CONVERSION_FACTOR / r_microohms, \ 37 "%f Out of Range [%f,%f] input %f, current-resistor: %dµΩ\nCheck if the sensor " \ [all …]
|
/Zephyr-latest/drivers/sensor/ti/ina23x/ |
D | ina23x_common.h | 4 * SPDX-License-Identifier: Apache-2.0 16 * @brief Macro used to check if the current's LSB is 1mA
|
D | ina230.c | 5 * SPDX-License-Identifier: Apache-2.0 19 /** @brief The LSB value for the bus voltage register, in microvolts/LSB. */ 30 struct ina230_data *data = dev->data; in ina230_channel_get() 31 const struct ina230_config *const config = dev->config; in ina230_channel_get() 37 bus_uv = data->bus_voltage * config->uv_lsb; in ina230_channel_get() 40 val->val1 = bus_uv / 1000000U; in ina230_channel_get() 41 val->val2 = bus_uv % 1000000U; in ina230_channel_get() 46 current_ua = data->current * config->current_lsb; in ina230_channel_get() 49 val->val1 = current_ua / 1000000L; in ina230_channel_get() 50 val->val2 = current_ua % 1000000L; in ina230_channel_get() [all …]
|
D | ina237.c | 4 * SPDX-License-Identifier: Apache-2.0 14 #include <zephyr/dt-bindings/sensor/ina237.h> 19 /** @brief Calibration scaling value (scaled by 10^-5) */ 22 /** @brief The LSB value for the bus voltage register, in microvolts/LSB. */ 29 * @brief Scale die temperture from 0.125 degC/bit to micro-degrees C 36 val->val1 = value_microX / 1000000L; in micro_s32_to_sensor_value() 37 val->val2 = value_microX % 1000000L; in micro_s32_to_sensor_value() 42 val->val1 = value_microX / 1000000U; in micro_u64_to_sensor_value() 43 val->val2 = value_microX % 1000000U; in micro_u64_to_sensor_value() 49 const struct ina237_data *data = dev->data; in ina237_channel_get() [all …]
|
/Zephyr-latest/drivers/sensor/ti/ina226/ |
D | ina226.c | 4 * SPDX-License-Identifier: Apache-2.0 13 #include <zephyr/dt-bindings/sensor/ina226.h> 40 int16_t current; member 58 /** @brief Calibration scaling value (scaled by 10^-5) */ 61 /** @brief The LSB value for the bus voltage register, in microvolts/LSB. */ 64 /** @brief The LSB value for the shunt voltage register, in microvolts/LSB. */ 98 val->val1 = value_microX / 1000000L; in micro_s32_to_sensor_value() 99 val->val2 = value_microX % 1000000L; in micro_s32_to_sensor_value() 105 const struct ina226_data *data = dev->data; in ina226_channel_get() 106 const struct ina226_config *config = dev->config; in ina226_channel_get() [all …]
|
/Zephyr-latest/include/zephyr/drivers/ |
D | i2s.h | 4 * SPDX-License-Identifier: Apache-2.0 9 * @brief Public APIs for the I2S (Inter-IC Sound) bus drivers. 20 * @brief I2S (Inter-IC Sound) Interface 23 * as common non-standard extensions such as PCM Short/Long Frame Sync, 55 * -. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. 56 * SCK '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' ' 57 * -. .-------------------------------. 58 * WS '-------------------------------' '---- 59 * -.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---. 60 * SD | |MSB| |...| |LSB| x |...| x |MSB| |...| |LSB| x |...| x | [all …]
|
/Zephyr-latest/arch/arm/core/cortex_a_r/ |
D | thread.c | 2 * Copyright (c) 2013-2014 Wind River Systems, Inc. 5 * SPDX-License-Identifier: Apache-2.0 10 * @brief New thread creation for ARM Cortex-A and Cortex-R 12 * Core thread related primitives for the ARM Cortex-A and 13 * Cortex-R processor architecture. 24 #define FP_GUARD_EXTRA_SIZE (MPU_GUARD_ALIGN_AND_SIZE_FLOAT - \ 31 /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ 44 * PendSV exception will want to pop an ESF. Interestingly, even if the lsb of 47 * with the lsb *not* set (instructions are always aligned on 16 bit 48 * halfwords). Since the compiler automatically sets the lsb of function [all …]
|
/Zephyr-latest/drivers/spi/ |
D | spi_nxp_s32.c | 2 * Copyright 2022-2024 NXP 4 * SPDX-License-Identifier: Apache-2.0 15 struct spi_context *ctx = &data->ctx; in spi_nxp_s32_last_packet() 17 if (ctx->tx_count <= 1U && ctx->rx_count <= 1U) { in spi_nxp_s32_last_packet() 18 if (!spi_context_tx_on(ctx) && (data->transfer_len == ctx->rx_len)) { in spi_nxp_s32_last_packet() 22 if (!spi_context_rx_on(ctx) && (data->transfer_len == ctx->tx_len)) { in spi_nxp_s32_last_packet() 26 if ((ctx->rx_len == ctx->tx_len) && (data->transfer_len == ctx->tx_len)) { in spi_nxp_s32_last_packet() 41 const struct spi_nxp_s32_config *config = dev->config; in spi_nxp_s32_transfer_next_packet() 42 struct spi_nxp_s32_data *data = dev->data; in spi_nxp_s32_transfer_next_packet() 49 data_cb = config->cb; in spi_nxp_s32_transfer_next_packet() [all …]
|
/Zephyr-latest/subsys/debug/ |
D | thread_info.c | 5 * SPDX-License-Identifier: Apache-2.0 34 /* Forward-compatibility notes: 1) Only append items to this table; otherwise 46 [THREAD_INFO_OFFSET_K_CURR_THREAD] = offsetof(struct _cpu, current), 132 /* ARM overwrites the LSB of the Link Register on the stack when 134 * then the LSB needs to be restored from mode_exc_return.
|
/Zephyr-latest/arch/arm/core/cortex_m/ |
D | thread.c | 2 * Copyright (c) 2013-2014 Wind River Systems, Inc. 6 * SPDX-License-Identifier: Apache-2.0 11 * @brief New thread creation for ARM Cortex-M 13 * Core thread related primitives for the ARM Cortex-M 25 #define FP_GUARD_EXTRA_SIZE (MPU_GUARD_ALIGN_AND_SIZE_FLOAT - \ 32 /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ 53 * PendSV exception will want to pop an ESF. Interestingly, even if the lsb of 56 * with the lsb *not* set (instructions are always aligned on 16 bit 57 * halfwords). Since the compiler automatically sets the lsb of function 70 /* Guard area is carved-out of the buffer instead of reserved in arch_new_thread() [all …]
|
/Zephyr-latest/drivers/sensor/nordic/npm1300_charger/ |
D | npm1300_charger.c | 3 * SPDX-License-Identifier: Apache-2.0 37 uint16_t current; member 143 /* Linear range for charger current */ 149 /* Linear range for vbusin current limit */ 157 float log_result = log((1024.f / (float)code) - 1); in calc_temp() 158 float inv_temp_k = (1.f / 298.15f) - (log_result / (float)config->thermistor_beta); in calc_temp() 160 float temp = (1.f / inv_temp_k) - 273.15f; in calc_temp() 162 valp->val1 = (int32_t)temp; in calc_temp() 163 valp->val2 = (int32_t)(fmodf(temp, 1.f) * 1000000.f); in calc_temp() 171 DIETEMP_OFFSET_MDEGC - (((int32_t)code * DIETEMP_FACTOR_MUL) / DIETEMP_FACTOR_DIV); in calc_dietemp() [all …]
|
/Zephyr-latest/tests/drivers/build_all/sensor/ |
D | i2c.dtsi | 4 * SPDX-License-Identifier: Apache-2.0 9 #include <zephyr/dt-bindings/sensor/lsm6dsv16x.h> 10 #include <zephyr/dt-bindings/sensor/lsm6dso.h> 11 #include <zephyr/dt-bindings/sensor/lsm6dso16is.h> 12 #include <zephyr/dt-bindings/sensor/lps22hh.h> 13 #include <zephyr/dt-bindings/sensor/lps2xdf.h> 14 #include <zephyr/dt-bindings/sensor/lis2ds12.h> 15 #include <zephyr/dt-bindings/sensor/lis2dw12.h> 16 #include <zephyr/dt-bindings/sensor/ism330dhcx.h> 17 #include <zephyr/dt-bindings/sensor/iis2dlpc.h> [all …]
|
/Zephyr-latest/boards/st/stm32g071b_disco/ |
D | stm32g071b_disco.dts | 4 * SPDX-License-Identifier: Apache-2.0 7 /dts-v1/; 9 #include <st/g0/stm32g071r(6-8-b)tx-pinctrl.dtsi> 10 #include <zephyr/dt-bindings/sensor/ina230.h> 11 #include <zephyr/dt-bindings/input/input-event-codes.h> 15 compatible = "st,stm32g071-demo"; 19 zephyr,shell-uart = &usart3; 25 compatible = "gpio-leds"; 45 compatible = "gpio-keys"; 74 compatible = "gpio-leds"; [all …]
|
/Zephyr-latest/tests/drivers/sensor/ina230/src/ |
D | ina230_test.c | 3 * SPDX-License-Identifier: Apache-2.0 11 #include <zephyr/dt-bindings/sensor/ina230.h> 40 config = dev->config; in ZTEST() 46 zexpect_equal(expected, config->config, "0x%x != config (0x%x)", in ZTEST() 47 expected, config->config); in ZTEST() 56 /* only run test for datasheet example of 1mA current LSB and 2 mOhm shunt */ in test_datasheet_example() 57 if (fixture->current_lsb_uA != 1000 || fixture->rshunt_uOhms != 2000) { in test_datasheet_example() 61 if (fixture->dev_type == INA230) { in test_datasheet_example() 71 ina230_mock_set_register(fixture->mock->data, INA230_REG_BUS_VOLT, raw_voltage); in test_datasheet_example() 72 ina230_mock_set_register(fixture->mock->data, INA230_REG_CURRENT, raw_current); in test_datasheet_example() [all …]
|
/Zephyr-latest/include/zephyr/modbus/ |
D | modbus.h | 5 * SPDX-License-Identifier: Apache-2.0 14 * Copyright 2003-2020 Silicon Laboratories Inc. www.silabs.com 16 * SPDX-License-Identifier: APACHE-2.0 20 * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 84 uint8_t data[CONFIG_MODBUS_BUFFER_SIZE - 4]; 101 * MSB LSB 103 * ------------------------------------- 111 * (num_coils - 1) / 8 + 1 135 * MSB LSB 137 * ------------------------------------- [all …]
|
/Zephyr-latest/drivers/sensor/nxp/fxos8700/ |
D | fxos8700_trigger.c | 5 * SPDX-License-Identifier: Apache-2.0 21 const struct fxos8700_config *config = data->dev->config; in fxos8700_gpio_callback() 23 if ((pin_mask & BIT(config->int_gpio.pin)) == 0U) { in fxos8700_gpio_callback() 27 gpio_pin_interrupt_configure_dt(&config->int_gpio, GPIO_INT_DISABLE); in fxos8700_gpio_callback() 30 k_sem_give(&data->trig_sem); in fxos8700_gpio_callback() 32 k_work_submit(&data->work); in fxos8700_gpio_callback() 38 struct fxos8700_data *data = dev->data; in fxos8700_handle_drdy_int() 40 if (data->drdy_handler) { in fxos8700_handle_drdy_int() 41 data->drdy_handler(dev, data->drdy_trig); in fxos8700_handle_drdy_int() 50 const struct fxos8700_config *config = dev->config; in fxos8700_handle_pulse_int() [all …]
|
/Zephyr-latest/drivers/sensor/st/lis2dw12/ |
D | lis2dw12.c | 1 /* ST Microelectronics LIS2DW12 3-axis accelerometer driver 5 * SPDX-License-Identifier: Apache-2.0 30 * lis2dw12_set_range - set full scale range for acc 37 struct lis2dw12_data *lis2dw12 = dev->data; in lis2dw12_set_range() 38 const struct lis2dw12_device_config *cfg = dev->config; in lis2dw12_set_range() 39 stmdev_ctx_t *ctx = (stmdev_ctx_t *)&cfg->ctx; in lis2dw12_set_range() 44 if (cfg->pm == LIS2DW12_CONT_LOW_PWR_12bit) { in lis2dw12_set_range() 50 lis2dw12->gain = in lis2dw12_set_range() 58 * lis2dw12_set_odr - set new sampling frequency 64 const struct lis2dw12_device_config *cfg = dev->config; in lis2dw12_set_odr() [all …]
|