Home
last modified time | relevance | path

Searched +full:divide +full:- +full:10 (Results 1 – 25 of 47) sorted by relevance

12

/Zephyr-latest/scripts/kconfig/
Dkconfigfunctions.py1 # Copyright (c) 2018-2019 Linaro
4 # SPDX-License-Identifier: Apache-2.0
17 "python-devicetree", "src"))
45 return 10
157 foo: some-node { ... };
206 The function will divide the value based on 'unit':
208 'k' or 'K' divide by 1024 (1 << 10)
209 'm' or 'M' divide by 1,048,576 (1 << 20)
210 'g' or 'G' divide by 1,073,741,824 (1 << 30)
211 'kb' or 'Kb' divide by 8192 (1 << 13)
[all …]
/Zephyr-latest/dts/bindings/tcpc/
Dnuvoton,numaker-tcpc.yaml2 # SPDX-License-Identifier: Apache-2.0
4 description: Nuvoton NuMaker USB Type-C port controller
6 compatible: "nuvoton,numaker-tcpc"
8 include: [base.yaml, reset-device.yaml, pinctrl-device.yaml]
23 vconn-overcurrent-event-polarity:
28 - "low-active"
29 - "high-active"
31 vconn-discharge-polarity:
36 - "low-active"
37 - "high-active"
[all …]
/Zephyr-latest/dts/bindings/sensor/
Dti,fdc2x1x.yaml2 # SPDX-License-Identifier: Apache-2.0
8 include: [sensor-device.yaml, i2c-device.yaml]
11 sd-gpios:
12 type: phandle-array
18 intb-gpios:
19 type: phandle-array
28 Set to identify the sensor as FDC2114 or FDC2214 (4-channel version)
33 Set the Auto-Scan Mode.
36 "active-channel" (single channel mode).
38 true = Auto-Scan conversions as selected by "rr-sequence"
[all …]
/Zephyr-latest/dts/bindings/can/
Dst,stm32h7-fdcan.yaml3 compatible: "st,stm32h7-fdcan"
5 include: ["bosch,m_can-base.yaml", "pinctrl-device.yaml"]
17 interrupt-names:
20 clk-divider:
23 - 1
24 - 2
25 - 4
26 - 6
27 - 8
28 - 10
[all …]
Dst,stm32-fdcan.yaml3 compatible: "st,stm32-fdcan"
5 include: ["bosch,m_can-base.yaml", "pinctrl-device.yaml"]
14 interrupt-names:
20 clk-divider:
23 - 1
24 - 2
25 - 4
26 - 6
27 - 8
28 - 10
[all …]
Dmicrochip,mcp251xfd.yaml2 # SPDX-License-Identifier: Apache-2.0
11 cs-gpios = <&mikrobus_header 2 GPIO_ACTIVE_LOW>;
17 spi-max-frequency = <18000000>;
18 int-gpios = <&mikrobus_header 7 GPIO_ACTIVE_LOW>;
20 osc-freq = <40000000>;
27 include: [spi-device.yaml, can-fd-controller.yaml]
30 osc-freq:
35 int-gpios:
36 type: phandle-array
39 The interrupt signal from the controller is active low in push-pull mode.
[all …]
/Zephyr-latest/samples/subsys/usb_c/sink/boards/
Dnumaker_m2l31ki.overlay1 /* SPDX-License-Identifier: Apache-2.0 */
3 #include <dt-bindings/usb-c/pd.h>
7 usbc-port0 = &port0;
11 #address-cells = <1>;
12 #size-cells = <0>;
14 port0: usbc-port@0 {
15 compatible = "usb-c-connector";
20 power-role = "sink";
21 sink-pdos = <PDO_FIXED(5000, 100, 0)>;
30 digital-path-disable;
[all …]
/Zephyr-latest/dts/bindings/display/
Dled-strip-matrix.yaml2 # SPDX-License-Identifier: Apache-2.0
7 compatible: "led-strip-matrix"
9 include: display-controller.yaml
23 [ 8][ 9][10][11]
29 [ 8][ 9][10][11]
32 start-from-right:
40 [11][10][ 9][ 8]
46 [11][10][ 9][ 8]
49 start-from-bottom:
56 [ 8][ 9][10][11]
[all …]
/Zephyr-latest/dts/riscv/
Driscv32-litex-vexriscv.dtsi2 * Copyright (c) 2018 - 2020 Antmicro <www.antmicro.com>
4 * SPDX-License-Identifier: Apache-2.0
7 #include <zephyr/dt-bindings/i2c/i2c.h>
10 #address-cells = <1>;
11 #size-cells = <1>;
12 compatible = "litex,vexriscv", "litex-dev";
21 #address-cells = <1>;
22 #size-cells = <0>;
24 clock-frequency = <100000000>;
25 compatible = "litex,vexriscv-standard", "riscv";
[all …]
/Zephyr-latest/samples/subsys/usb/uac2_explicit_feedback/src/
Dfeedback_nrf53.c4 * SPDX-License-Identifier: Apache-2.0
41 * this sample uses target-specific code to perform the measurements. Note that
42 * the use of dedicated target-specific peripheral essentially eliminates
46 * Full-Speed isochronous feedback is Q10.10 unsigned integer left-justified in
47 * the 24-bits so it has Q10.14 format. This sample application puts zeroes to
50 #define FEEDBACK_K 10
109 LOG_ERR("nrfx timer init error (sample clk feedback) - Return value: %d", err); in feedback_edge_counter_setup()
142 LOG_ERR("nrfx timer init error (relative timer) - Return value: %d", err); in feedback_relative_timer_setup()
228 sof_offset = framestart_cc - (SAMPLES_PER_SOF << FEEDBACK_P); in update_sof_offset()
237 if ((ctx->rel_sof_offset >= 0) != (sof_offset >= 0)) { in update_sof_offset()
[all …]
/Zephyr-latest/drivers/sensor/bosch/bme280/
Dbme280.h6 * SPDX-License-Identifier: Apache-2.0
158 * Need to divide by 1000 to convert to kPa
162 /* Treat UQ22.10 as Q21.10 */
/Zephyr-latest/drivers/sensor/lm75/
Dlm75.c5 * SPDX-License-Identifier: Apache-2.0
24 * enabled lm75 devicetree node has the int-gpios property.
71 const struct lm75_config *cfg = dev->config; in lm75_reg_read()
73 return i2c_burst_read_dt(&cfg->i2c, reg, buf, size); in lm75_reg_read()
79 const struct lm75_config *cfg = dev->config; in lm75_reg_write()
81 return i2c_burst_write_dt(&cfg->i2c, reg, buf, size); in lm75_reg_write()
92 return -EIO; in lm75_temp_read()
110 *temp = val->val1 * 10; in lm75_sensor_value_to_temp()
111 *temp += val->val2 / 100000U; in lm75_sensor_value_to_temp()
113 *temp = (*temp * 256) / 10; in lm75_sensor_value_to_temp()
[all …]
/Zephyr-latest/soc/nxp/imxrt/imxrt118x/
Dsoc.c4 * SPDX-License-Identifier: Apache-2.0
12 #include <zephyr/linker/linker-defs.h>
24 #include <zephyr/dt-bindings/clock/imx_ccm_rev2.h>
49 /* Post divider, 0 - DIV by 2, 1 - DIV by 4, 2 - DIV by 8, 3 - DIV by 1 */
60 /* Enable Sys Pll1 divide-by-2 clock or not */
62 /* Enable Sys Pll1 divide-by-5 clock or not */
129 ANADIG_OSC->OSC_24M_CTRL |= ANADIG_OSC_OSC_24M_CTRL_OSC_EN(1) | in clock_init()
135 (ANADIG_OSC->OSC_24M_CTRL & ANADIG_OSC_OSC_24M_CTRL_OSC_24M_STABLE_MASK)) { in clock_init()
233 rootCfg.div = 10; in clock_init()
322 rootCfg.div = 10; in clock_init()
[all …]
/Zephyr-latest/drivers/pwm/
Dpwm_ite_it8xxx2.c4 * SPDX-License-Identifier: Apache-2.0
12 #include <zephyr/dt-bindings/pwm/it8xxx2_pwm.h>
54 const struct pwm_it8xxx2_cfg *config = dev->config; in pwm_enable()
55 volatile uint8_t *reg_pcsgr = (uint8_t *)config->reg_pcsgr; in pwm_enable()
56 int ch = config->channel; in pwm_enable()
74 * 1) pwm_set_cycles_usec() -> pwm_set_cycles_cycles() -> pwm_it8xxx2_set_cycles() in pwm_it8xxx2_get_cycles_per_sec()
78 * 2) pwm_set_cycles_nsec() -> pwm_set_cycles_cycles() -> pwm_it8xxx2_set_cycles() in pwm_it8xxx2_get_cycles_per_sec()
82 * 3) pwm_set_cycles_cycles() -> pwm_it8xxx2_set_cycles() in pwm_it8xxx2_get_cycles_per_sec()
99 const struct pwm_it8xxx2_cfg *config = dev->config; in pwm_it8xxx2_set_cycles()
100 struct pwm_it8xxx2_regs *const inst = config->base; in pwm_it8xxx2_set_cycles()
[all …]
/Zephyr-latest/drivers/fuel_gauge/max17048/
Dmax17048.c1 /* max17048.c - Driver for max17048 battery fuel gauge */
6 * SPDX-License-Identifier: Apache-2.0
52 const struct max17048_config *cfg = dev->config; in max17048_read_register()
53 int rc = i2c_write_read_dt(&cfg->i2c, &registerId, sizeof(registerId), max17048_buffer, in max17048_read_register()
85 * https://www.analog.com/media/en/technical-documentation/data-sheets/ in max17048_voltage()
86 * MAX17048-MAX17049.pdf in max17048_voltage()
87 * Page 10, Table 2. Register Summary: 78.125µV/cell in max17048_voltage()
109 * https://www.analog.com/media/en/technical-documentation/data-she4ets/ in max17048_percent()
110 * MAX17048-MAX17049.pdf in max17048_percent()
111 * Page 10, Table 2. Register Summary: 1%/256 in max17048_percent()
[all …]
/Zephyr-latest/drivers/spi/
Dspi_dw.h1 /* spi_dw.h - Designware SPI driver private definitions */
7 * SPDX-License-Identifier: Apache-2.0
106 return -EINVAL; in reg_read()
148 const struct spi_dw_config *info = dev->config; \
149 return info->read_func(__sz, (mm_reg_t)DEVICE_MMIO_GET(dev), __off); \
154 const struct spi_dw_config *info = dev->config; \
155 info->write_func(__sz, data, (mm_reg_t)DEVICE_MMIO_GET(dev), __off); \
161 const struct spi_dw_config *info = dev->config; \
162 info->set_bit_func(__bit, (mm_reg_t)DEVICE_MMIO_GET(dev), __reg_off); \
168 const struct spi_dw_config *info = dev->config; \
[all …]
/Zephyr-latest/tests/kernel/fatal/exception/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
38 alt_stack + (STACKSIZE - OVERFLOW_STACKSIZE);
51 static ZTEST_DMEM volatile int expected_reason = -1;
55 TC_PRINT("Caught system error -- reason %d\n", reason); in k_sys_fatal_error_handler()
57 if (expected_reason == -1) { in k_sys_fatal_error_handler()
76 expected_reason = -1; in k_sys_fatal_error_handler()
127 /* used to create a divide by zero error on X86 and MIPS */ in entry_cpu_exception_extend()
174 expected_reason = -2; in entry_arbitrary_reason_negative()
176 z_except_reason(-2); in entry_arbitrary_reason_negative()
197 #pragma GCC diagnostic ignored "-Wpragmas"
[all …]
/Zephyr-latest/drivers/sensor/ti/tmag5170/
Dtmag5170.c4 * SPDX-License-Identifier: Apache-2.0
75 #define TMAG5170_SLEEPTIME_POS 10U
123 #define TMAG5170_MT_TO_GAUSS_RATIO 10U
163 int ret = spi_transceive_dt(&config->bus, &tx, &rx); in tmag5170_transmit_raw()
176 int ret = tmag5170_transmit_raw(dev->config, buffer_tx, buffer_rx); in tmag5170_transmit()
184 return -EIO; in tmag5170_transmit()
228 return -ENOTSUP; in tmag5170_convert_magn_reading_to_gauss()
241 int64_t result = chan_reading - ((chan_reading & 0x8000) << 1); in tmag5170_convert_magn_reading_to_gauss()
248 /* Divide as it is shown in datasheet */ in tmag5170_convert_magn_reading_to_gauss()
252 output->val1 = result / 100000; in tmag5170_convert_magn_reading_to_gauss()
[all …]
/Zephyr-latest/include/zephyr/sys/
Dutil.h2 * Copyright (c) 2011-2014, Wind River Systems, Inc.
4 * SPDX-License-Identifier: Apache-2.0
40 * @defgroup sys-util Utility Functions
80 (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
83 * @brief Create a contiguous 64-bit bitmask starting at bit position @p l
87 (((~0ULL) - (1ULL << (l)) + 1) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))
89 /** @brief 0 if @p cond is true-ish; causes a compile error otherwise. */
90 #define ZERO_OR_COMPILE_ERROR(cond) ((int) sizeof(char[1 - 2 * !(cond)]) - 1)
94 /* The built-in function used below for type checking in C is not
152 * in that it also ensures that @p ptr is aligned to an array-element boundary
[all …]
/Zephyr-latest/subsys/bluetooth/common/
DKconfig5 # SPDX-License-Identifier: Apache-2.0
21 In a Host-only build the Host will read the maximum ACL size supported
47 determines how to divide the buffers between the connections.
109 enforced by a build-time check: BT_BUF_ACL_RX_COUNT needs to be at
131 default 10
195 ZEPHYR_BT_HCI := zephyr,bt-hci
199 default $(dt_chosen_bool_prop,$(ZEPHYR_BT_HCI),bt-hci-vs-ext)
202 for the Zephyr HCI Vendor-Specific Commands and Event.
205 bool "Zephyr HCI Vendor-Specific Commands"
209 Enable support for the Zephyr HCI Vendor-Specific Commands in the
[all …]
/Zephyr-latest/drivers/i2c/
Di2c_sam4l_twim.c3 * Copyright (c) 2020-2023 Gerson Fernando Budke <nandojve@gmail.com>
5 * SPDX-License-Identifier: Apache-2.0
13 * I2C Master Mode with 7/10 bit addressing is currently supported.
33 #include "i2c-priv.h"
109 const struct i2c_sam_twim_dev_cfg *const cfg = dev->config; in i2c_clk_set()
110 Twim *const twim = cfg->regs; in i2c_clk_set()
120 /* divide f_prescaled value */ in i2c_clk_set()
126 return -EIO; in i2c_clk_set()
130 TWIM_HSCWGR_HIGH(f_prescaled - in i2c_clk_set()
140 twim->HSCWGR = cwgr_reg_val; in i2c_clk_set()
[all …]
/Zephyr-latest/subsys/bluetooth/controller/ll_sw/
Dull_conn.c2 * Copyright (c) 2018-2021 Nordic Semiconductor ASA
4 * SPDX-License-Identifier: Apache-2.0
195 if (conn->lll.handle != handle) { in ll_connected_get()
230 return -EINVAL; in ll_tx_mem_enqueue()
235 return -ENOBUFS; in ll_tx_mem_enqueue()
238 lll_tx->handle = handle; in ll_tx_mem_enqueue()
239 lll_tx->node = tx; in ll_tx_mem_enqueue()
244 if (ull_ref_get(&conn->ull)) { in ll_tx_mem_enqueue()
249 force_md_cnt = force_md_cnt_calc(&conn->lll, tx_rate); in ll_tx_mem_enqueue()
266 if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) { in ll_tx_mem_enqueue()
[all …]
/Zephyr-latest/scripts/pylib/twister/twisterlib/
Dsize_calc.py5 # SPDX-License-Identifier: Apache-2.0
73 # These get copied into RAM only on non-XIP
168 def get_available_ram(self) -> int:
175 def get_available_rom(self) -> int:
192 def _check_elf_file(self) -> None:
204 def _check_is_xip(self) -> None:
212 "utf-8").strip()
222 def _get_info_elf_sections(self) -> None:
224 objdump_command = "objdump -h " + self.elf_filename
226 objdump_command, shell=True).decode("utf-8").splitlines()
[all …]
/Zephyr-latest/drivers/sensor/st/lsm6dso/
Dlsm6dso.c1 /* ST Microelectronics LSM6DSO 6-axis IMU sensor driver
5 * SPDX-License-Identifier: Apache-2.0
36 return -EINVAL; in lsm6dso_freq_to_odr_val()
47 return lsm6dso_odr_map[ARRAY_SIZE(lsm6dso_odr_map) - 1]; in lsm6dso_odr_to_freq_val()
62 return -EINVAL; in lsm6dso_accel_range_to_fs_val()
67 /* Range of ±2G has a LSB of GAIN_UNIT_XL, thus divide by 2 */ in lsm6dso_accel_fs_val_to_gain()
86 return -EINVAL; in lsm6dso_gyro_range_to_fs_val()
91 const struct lsm6dso_config *cfg = dev->config; in lsm6dso_reboot()
92 stmdev_ctx_t *ctx = (stmdev_ctx_t *)&cfg->ctx; in lsm6dso_reboot()
95 return -EIO; in lsm6dso_reboot()
[all …]
/Zephyr-latest/drivers/sensor/nxp/fxls8974/
Dfxls8974.c5 * SPDX-License-Identifier: Apache-2.0
26 const struct fxls8974_config *cfg = dev->config; in fxls8974_transceive()
30 return spi_transceive_dt(&cfg->bus_cfg.spi, &s, &s); in fxls8974_transceive()
38 const struct fxls8974_config *cfg = dev->config; in fxls8974_read_spi()
49 return spi_transceive_dt(&cfg->bus_cfg.spi, &tx, &rx); in fxls8974_read_spi()
84 return -EIO; in fxls8974_reg_field_update_spi()
104 const struct fxls8974_config *cfg = dev->config; in fxls8974_read_i2c()
106 return i2c_burst_read_dt(&cfg->bus_cfg.i2c, reg, data, length); in fxls8974_read_i2c()
113 const struct fxls8974_config *cfg = dev->config; in fxls8974_byte_read_i2c()
115 return i2c_reg_read_byte_dt(&cfg->bus_cfg.i2c, reg, byte); in fxls8974_byte_read_i2c()
[all …]

12