Home
last modified time | relevance | path

Searched refs:val (Results 1 – 25 of 550) sorted by relevance

12345678910>>...22

/Zephyr-Core-2.7.6/include/sys/
Dbyteorder.h172 #define sys_le16_to_cpu(val) (val) argument
173 #define sys_cpu_to_le16(val) (val) argument
174 #define sys_le24_to_cpu(val) (val) argument
175 #define sys_cpu_to_le24(val) (val) argument
176 #define sys_le32_to_cpu(val) (val) argument
177 #define sys_cpu_to_le32(val) (val) argument
178 #define sys_le48_to_cpu(val) (val) argument
179 #define sys_cpu_to_le48(val) (val) argument
180 #define sys_le64_to_cpu(val) (val) argument
181 #define sys_cpu_to_le64(val) (val) argument
[all …]
/Zephyr-Core-2.7.6/tests/kernel/common/src/
Dbyteorder.c79 uint64_t val = 0xf0e1d2c3b4a59687, tmp; in test_sys_get_be64() local
86 zassert_equal(tmp, val, "sys_get_be64() failed"); in test_sys_get_be64()
98 uint64_t val = 0xf0e1d2c3b4a59687; in test_sys_put_be64() local
104 sys_put_be64(val, tmp); in test_sys_put_be64()
118 uint64_t val = 0xf0e1d2c3b4a5, tmp; in test_sys_get_be48() local
125 zassert_equal(tmp, val, "sys_get_be64() failed"); in test_sys_get_be48()
137 uint64_t val = 0xf0e1d2c3b4a5; in test_sys_put_be48() local
143 sys_put_be48(val, tmp); in test_sys_put_be48()
156 uint32_t val = 0xf0e1d2c3, tmp; in test_sys_get_be32() local
163 zassert_equal(tmp, val, "sys_get_be32() failed"); in test_sys_get_be32()
[all …]
/Zephyr-Core-2.7.6/tests/drivers/sensor/generic/src/
Ddummy_sensor.c35 struct sensor_value *val) in dummy_sensor_channel_get() argument
41 val->val1 = data->val[0].val1; in dummy_sensor_channel_get()
42 val->val2 = data->val[0].val2; in dummy_sensor_channel_get()
45 val->val1 = data->val[1].val1; in dummy_sensor_channel_get()
46 val->val2 = data->val[1].val2; in dummy_sensor_channel_get()
49 val->val1 = data->val[2].val1; in dummy_sensor_channel_get()
50 val->val2 = data->val[2].val2; in dummy_sensor_channel_get()
53 val->val1 = data->val[3].val1; in dummy_sensor_channel_get()
54 val->val2 = data->val[3].val2; in dummy_sensor_channel_get()
57 val->val1 = data->val[4].val1; in dummy_sensor_channel_get()
[all …]
/Zephyr-Core-2.7.6/subsys/net/
Dbuf.c774 uint8_t *net_buf_simple_add_u8(struct net_buf_simple *buf, uint8_t val) in net_buf_simple_add_u8() argument
778 NET_BUF_SIMPLE_DBG("buf %p val 0x%02x", buf, val); in net_buf_simple_add_u8()
781 *u8 = val; in net_buf_simple_add_u8()
786 void net_buf_simple_add_le16(struct net_buf_simple *buf, uint16_t val) in net_buf_simple_add_le16() argument
788 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_add_le16()
790 sys_put_le16(val, net_buf_simple_add(buf, sizeof(val))); in net_buf_simple_add_le16()
793 void net_buf_simple_add_be16(struct net_buf_simple *buf, uint16_t val) in net_buf_simple_add_be16() argument
795 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_add_be16()
797 sys_put_be16(val, net_buf_simple_add(buf, sizeof(val))); in net_buf_simple_add_be16()
800 void net_buf_simple_add_le24(struct net_buf_simple *buf, uint32_t val) in net_buf_simple_add_le24() argument
[all …]
/Zephyr-Core-2.7.6/subsys/bluetooth/host/
Duuid.c27 .val = { BT_UUID_128_ENCODE(
36 sys_put_le16(BT_UUID_16(src)->val, in uuid_to_uuid128()
37 &dst->val[UUID_16_BASE_OFFSET]); in uuid_to_uuid128()
41 sys_put_le32(BT_UUID_32(src)->val, in uuid_to_uuid128()
42 &dst->val[UUID_16_BASE_OFFSET]); in uuid_to_uuid128()
57 return memcmp(uuid1.val, uuid2.val, 16); in uuid128_cmp()
69 return (int)BT_UUID_16(u1)->val - (int)BT_UUID_16(u2)->val; in bt_uuid_cmp()
71 return (int)BT_UUID_32(u1)->val - (int)BT_UUID_32(u2)->val; in bt_uuid_cmp()
73 return memcmp(BT_UUID_128(u1)->val, BT_UUID_128(u2)->val, 16); in bt_uuid_cmp()
85 BT_UUID_16(uuid)->val = sys_get_le16(data); in bt_uuid_create()
[all …]
/Zephyr-Core-2.7.6/include/bluetooth/
Daddr.h35 uint8_t val[6]; member
100 #define BT_ADDR_IS_RPA(a) (((a)->val[5] & 0xc0) == 0x40)
103 #define BT_ADDR_IS_NRPA(a) (((a)->val[5] & 0xc0) == 0x00)
105 #define BT_ADDR_IS_STATIC(a) (((a)->val[5] & 0xc0) == 0xc0)
108 #define BT_ADDR_SET_RPA(a) ((a)->val[5] = (((a)->val[5] & 0x3f) | 0x40))
110 #define BT_ADDR_SET_NRPA(a) ((a)->val[5] &= 0x3f)
112 #define BT_ADDR_SET_STATIC(a) ((a)->val[5] |= 0xc0)
187 addr->val[5], addr->val[4], addr->val[3], in bt_addr_to_str()
188 addr->val[2], addr->val[1], addr->val[0]); in bt_addr_to_str()
225 addr->a.val[5], addr->a.val[4], addr->a.val[3], in bt_addr_le_to_str()
[all …]
/Zephyr-Core-2.7.6/drivers/sensor/mpu6050/
Dmpu6050.c20 static void mpu6050_convert_accel(struct sensor_value *val, int16_t raw_val, in mpu6050_convert_accel() argument
26 val->val1 = conv_val / 1000000; in mpu6050_convert_accel()
27 val->val2 = conv_val % 1000000; in mpu6050_convert_accel()
31 static void mpu6050_convert_gyro(struct sensor_value *val, int16_t raw_val, in mpu6050_convert_gyro() argument
38 val->val1 = conv_val / 1000000; in mpu6050_convert_gyro()
39 val->val2 = conv_val % 1000000; in mpu6050_convert_gyro()
43 static inline void mpu6050_convert_temp(struct sensor_value *val, in mpu6050_convert_temp() argument
46 val->val1 = raw_val / 340 + 36; in mpu6050_convert_temp()
47 val->val2 = ((int64_t)(raw_val % 340) * 1000000) / 340 + 530000; in mpu6050_convert_temp()
49 if (val->val2 < 0) { in mpu6050_convert_temp()
[all …]
/Zephyr-Core-2.7.6/drivers/sensor/icm42605/
Dicm42605.c27 static void icm42605_convert_accel(struct sensor_value *val, in icm42605_convert_accel() argument
34 val->val1 = conv_val / 1000000; in icm42605_convert_accel()
35 val->val2 = conv_val % 1000000; in icm42605_convert_accel()
39 static void icm42605_convert_gyro(struct sensor_value *val, in icm42605_convert_gyro() argument
47 val->val1 = conv_val / 1000000; in icm42605_convert_gyro()
48 val->val2 = conv_val % 1000000; in icm42605_convert_gyro()
52 static inline void icm42605_convert_temp(struct sensor_value *val, in icm42605_convert_temp() argument
55 val->val1 = (((int64_t)raw_val * 100) / 207) + 25; in icm42605_convert_temp()
56 val->val2 = ((((int64_t)raw_val * 100) % 207) * 1000000) / 207; in icm42605_convert_temp()
58 if (val->val2 < 0) { in icm42605_convert_temp()
[all …]
/Zephyr-Core-2.7.6/drivers/audio/
Dtlv320dac310x.c59 uint8_t val);
61 uint8_t *val);
168 audio_property_value_t val) in codec_set_property() argument
179 return codec_set_output_volume(dev, val.vol); in codec_set_property()
182 if (val.mute) { in codec_set_property()
203 uint8_t val) in codec_write_reg() argument
216 dev_cfg->i2c_address, reg.reg_addr, val); in codec_write_reg()
218 reg.page, reg.reg_addr, val); in codec_write_reg()
222 uint8_t *val) in codec_read_reg() argument
235 dev_cfg->i2c_address, reg.reg_addr, val); in codec_read_reg()
[all …]
Dtlv320dac310x.h25 #define NDAC_DIV(val) ((val) & NDAC_DIV_MASK) argument
31 #define MDAC_DIV(val) ((val) & MDAC_DIV_MASK) argument
50 #define IF_CTRL_IFTYPE(val) (((val) & IF_CTRL_IFTYPE_MASK) << 6) argument
52 #define IF_CTRL_WLEN(val) (((val) & IF_CTRL_WLEN_MASK) << 4) argument
64 #define BCLK_DIV(val) ((val) & MDAC_DIV_MASK) argument
70 #define PROC_BLK_SEL(val) ((val) & PROC_BLK_SEL_MASK) argument
93 #define HEADPHONE_DRV_CM(val) (((val) << 3) & HEADPHONE_DRV_CM_MASK) argument
107 #define HPX_ANA_VOL(val) (((val) & HPX_ANA_VOL_MASK) | \ argument
127 #define TIMER_MCLK_DIV_VAL(val) ((val) & TIMER_MCLK_DIV_MASK) argument
/Zephyr-Core-2.7.6/samples/sensor/mcux_acmp/src/
Dmain.c27 int32_t val; member
32 { .attr = SENSOR_ATTR_MCUX_ACMP_POSITIVE_PORT_INPUT, .val = 1 },
35 .val = ACMP_POSITIVE },
37 { .attr = SENSOR_ATTR_MCUX_ACMP_NEGATIVE_PORT_INPUT, .val = 0 },
40 .val = ACMP_NEGATIVE },
43 .val = ACMP_DAC_VREF },
45 { .attr = SENSOR_ATTR_MCUX_ACMP_DAC_VALUE, .val = ACMP_DAC_VALUE },
47 { .attr = SENSOR_ATTR_MCUX_ACMP_HYSTERESIS_LEVEL, .val = 3 },
49 { .attr = SENSOR_ATTR_MCUX_ACMP_OFFSET_LEVEL, .val = 0 },
79 struct sensor_value val; in main() local
[all …]
/Zephyr-Core-2.7.6/drivers/sensor/lsm9ds0_mfd/
Dlsm9ds0_mfd.c74 const struct sensor_value *val) in lsm9ds0_mfd_accel_set_odr() argument
79 if (val->val1 < lsm9ds0_mfd_accel_odr_map[i].freq_int || in lsm9ds0_mfd_accel_set_odr()
80 (val->val1 == lsm9ds0_mfd_accel_odr_map[i].freq_int && in lsm9ds0_mfd_accel_set_odr()
81 val->val2 <= lsm9ds0_mfd_accel_odr_map[i].freq_micro)) { in lsm9ds0_mfd_accel_set_odr()
120 static int lsm9ds0_mfd_accel_set_fs(const struct device *dev, int val) in lsm9ds0_mfd_accel_set_fs() argument
125 if (val <= lsm9ds0_mfd_accel_fs_map[i].fs) { in lsm9ds0_mfd_accel_set_fs()
161 const struct sensor_value *val) in lsm9ds0_mfd_magn_set_odr() argument
166 if (val->val1 < lsm9ds0_mfd_accel_odr_map[i].freq_int || in lsm9ds0_mfd_magn_set_odr()
167 (val->val1 == lsm9ds0_mfd_accel_odr_map[i].freq_int && in lsm9ds0_mfd_magn_set_odr()
168 val->val2 <= lsm9ds0_mfd_accel_odr_map[i].freq_micro)) { in lsm9ds0_mfd_magn_set_odr()
[all …]
/Zephyr-Core-2.7.6/include/arch/arm64/
Dsys_io.h38 uint8_t val; in sys_read8() local
40 __asm__ volatile("ldrb %w0, [%1]" : "=r" (val) : "r" (addr)); in sys_read8()
43 return val; in sys_read8()
54 uint16_t val; in sys_read16() local
56 __asm__ volatile("ldrh %w0, [%1]" : "=r" (val) : "r" (addr)); in sys_read16()
59 return val; in sys_read16()
70 uint32_t val; in sys_read32() local
72 __asm__ volatile("ldr %w0, [%1]" : "=r" (val) : "r" (addr)); in sys_read32()
75 return val; in sys_read32()
86 uint64_t val; in sys_read64() local
[all …]
/Zephyr-Core-2.7.6/drivers/sensor/fxos8700/
Dfxos8700.c22 const struct sensor_value *val) in fxos8700_set_odr() argument
30 if (val->val1 == 400 && val->val2 == 0) { in fxos8700_set_odr()
32 } else if (val->val1 == 200 && val->val2 == 0) { in fxos8700_set_odr()
34 } else if (val->val1 == 100 && val->val2 == 0) { in fxos8700_set_odr()
36 } else if (val->val1 == 50 && val->val2 == 0) { in fxos8700_set_odr()
38 } else if (val->val1 == 25 && val->val2 == 0) { in fxos8700_set_odr()
40 } else if (val->val1 == 6 && val->val2 == 250000) { in fxos8700_set_odr()
42 } else if (val->val1 == 3 && val->val2 == 125000) { in fxos8700_set_odr()
44 } else if (val->val1 == 0 && val->val2 == 781300) { in fxos8700_set_odr()
50 if (val->val1 == 800 && val->val2 == 0) { in fxos8700_set_odr()
[all …]
/Zephyr-Core-2.7.6/subsys/bluetooth/mesh/
Dheartbeat.h7 static inline uint16_t bt_mesh_hb_pwr2(uint8_t val) in bt_mesh_hb_pwr2() argument
9 if (!val) { in bt_mesh_hb_pwr2()
11 } else if (val == 0xff || val == 0x11) { in bt_mesh_hb_pwr2()
14 return (1 << (val - 1)); in bt_mesh_hb_pwr2()
18 static inline uint8_t bt_mesh_hb_log(uint32_t val) in bt_mesh_hb_log() argument
20 if (!val) { in bt_mesh_hb_log()
22 } else if (val == 0xffff) { in bt_mesh_hb_log()
25 return 32 - __builtin_clz(val); in bt_mesh_hb_log()
/Zephyr-Core-2.7.6/drivers/sensor/tmp007/
Dtmp007.c24 uint8_t reg, uint16_t *val) in tmp007_reg_read() argument
27 reg, (uint8_t *) val, 2) < 0) { in tmp007_reg_read()
32 *val = sys_be16_to_cpu(*val); in tmp007_reg_read()
37 int tmp007_reg_write(struct tmp007_data *drv_data, uint8_t reg, uint16_t val) in tmp007_reg_write() argument
39 uint8_t tx_buf[3] = {reg, val >> 8, val & 0xFF}; in tmp007_reg_write()
46 uint16_t mask, uint16_t val) in tmp007_reg_update() argument
56 new_val |= val & mask; in tmp007_reg_update()
65 uint16_t val; in tmp007_sample_fetch() local
69 if (tmp007_reg_read(drv_data, TMP007_REG_TOBJ, &val) < 0) { in tmp007_sample_fetch()
73 if (val & TMP007_DATA_INVALID_BIT) { in tmp007_sample_fetch()
[all …]
/Zephyr-Core-2.7.6/arch/arc/core/
Dprep_c.c41 unsigned int val;
43 val = z_arc_v2_aux_reg_read(_ARC_V2_I_CACHE_BUILD);
44 val &= 0xff; /* version field */
45 if (val == 0) {
65 unsigned int val;
67 val = z_arc_v2_aux_reg_read(_ARC_V2_D_CACHE_BUILD);
68 val &= 0xff; /* version field */
69 if (val == 0) {
/Zephyr-Core-2.7.6/drivers/sensor/tmp112/
Dtmp112.c41 uint8_t reg, uint16_t *val) in tmp112_reg_read() argument
43 uint8_t buf[sizeof(val)]; in tmp112_reg_read()
49 *val = sys_get_be16(buf); in tmp112_reg_read()
55 uint8_t reg, uint16_t val) in tmp112_reg_write() argument
57 uint16_t val_be = sys_cpu_to_be16(val); in tmp112_reg_write()
63 uint16_t mask, uint16_t val) in tmp112_reg_update() argument
73 new_val |= val & mask; in tmp112_reg_update()
81 const struct sensor_value *val) in tmp112_attr_set() argument
95 if (val->val1 == 128) { in tmp112_attr_set()
97 } else if (val->val1 == 150) { in tmp112_attr_set()
[all …]
/Zephyr-Core-2.7.6/arch/arm64/core/cortex_r/mpu/
Darm_mpu.c58 uint64_t val; in arm_core_mpu_enable() local
60 val = read_sctlr_el1(); in arm_core_mpu_enable()
61 val |= SCTLR_M_BIT; in arm_core_mpu_enable()
62 write_sctlr_el1(val); in arm_core_mpu_enable()
72 uint64_t val; in arm_core_mpu_disable() local
77 val = read_sctlr_el1(); in arm_core_mpu_disable()
78 val &= ~SCTLR_M_BIT; in arm_core_mpu_disable()
79 write_sctlr_el1(val); in arm_core_mpu_disable()
140 uint64_t val; in z_arm64_mm_init() local
144 val = read_currentel(); in z_arm64_mm_init()
[all …]
/Zephyr-Core-2.7.6/drivers/sensor/lsm6dsl/
Dlsm6dsl.c220 const struct sensor_value *val) in lsm6dsl_accel_config() argument
225 return lsm6dsl_accel_range_set(dev, sensor_ms2_to_g(val)); in lsm6dsl_accel_config()
229 return lsm6dsl_accel_odr_set(dev, val->val1); in lsm6dsl_accel_config()
283 const struct sensor_value *val) in lsm6dsl_gyro_config() argument
288 return lsm6dsl_gyro_range_set(dev, sensor_rad_to_degrees(val)); in lsm6dsl_gyro_config()
292 return lsm6dsl_gyro_odr_set(dev, val->val1); in lsm6dsl_gyro_config()
305 const struct sensor_value *val) in lsm6dsl_attr_set() argument
309 return lsm6dsl_accel_config(dev, chan, attr, val); in lsm6dsl_attr_set()
311 return lsm6dsl_gyro_config(dev, chan, attr, val); in lsm6dsl_attr_set()
469 static inline void lsm6dsl_accel_convert(struct sensor_value *val, int raw_val, in lsm6dsl_accel_convert() argument
[all …]
/Zephyr-Core-2.7.6/drivers/sensor/ism330dhcx/
Dism330dhcx.c186 const struct sensor_value *val) in ism330dhcx_accel_config() argument
190 return ism330dhcx_accel_range_set(dev, sensor_ms2_to_g(val)); in ism330dhcx_accel_config()
192 return ism330dhcx_accel_odr_set(dev, val->val1); in ism330dhcx_accel_config()
240 const struct sensor_value *val) in ism330dhcx_gyro_config() argument
244 return ism330dhcx_gyro_range_set(dev, sensor_rad_to_degrees(val)); in ism330dhcx_gyro_config()
246 return ism330dhcx_gyro_odr_set(dev, val->val1); in ism330dhcx_gyro_config()
258 const struct sensor_value *val) in ism330dhcx_attr_set() argument
262 return ism330dhcx_accel_config(dev, chan, attr, val); in ism330dhcx_attr_set()
264 return ism330dhcx_gyro_config(dev, chan, attr, val); in ism330dhcx_attr_set()
269 return ism330dhcx_shub_config(dev, chan, attr, val); in ism330dhcx_attr_set()
[all …]
/Zephyr-Core-2.7.6/subsys/shell/
Dshell_ops.h87 static inline bool z_flag_insert_mode_set(const struct shell *shell, bool val) in z_flag_insert_mode_set() argument
91 Z_SHELL_SET_FLAG_ATOMIC(shell, insert_mode, val, ret); in z_flag_insert_mode_set()
100 static inline bool z_flag_use_colors_set(const struct shell *shell, bool val) in z_flag_use_colors_set() argument
104 Z_SHELL_SET_FLAG_ATOMIC(shell, use_colors, val, ret); in z_flag_use_colors_set()
113 static inline bool z_flag_echo_set(const struct shell *shell, bool val) in z_flag_echo_set() argument
117 Z_SHELL_SET_FLAG_ATOMIC(shell, echo, val, ret); in z_flag_echo_set()
126 static inline bool z_flag_obscure_set(const struct shell *shell, bool val) in z_flag_obscure_set() argument
130 Z_SHELL_SET_FLAG_ATOMIC(shell, obscure, val, ret); in z_flag_obscure_set()
139 static inline bool z_flag_processing_set(const struct shell *shell, bool val) in z_flag_processing_set() argument
143 Z_SHELL_SET_FLAG_ATOMIC(shell, processing, val, ret); in z_flag_processing_set()
[all …]
/Zephyr-Core-2.7.6/lib/os/
Dcrc8_sw.c16 uint8_t crc8_ccitt(uint8_t val, const void *buf, size_t cnt) in crc8_ccitt() argument
22 val ^= p[i]; in crc8_ccitt()
23 val = (val << 4) ^ crc8_ccitt_small_table[val >> 4]; in crc8_ccitt()
24 val = (val << 4) ^ crc8_ccitt_small_table[val >> 4]; in crc8_ccitt()
26 return val; in crc8_ccitt()
/Zephyr-Core-2.7.6/include/net/
Dbuf.h228 uint8_t *net_buf_simple_add_u8(struct net_buf_simple *buf, uint8_t val);
240 void net_buf_simple_add_le16(struct net_buf_simple *buf, uint16_t val);
252 void net_buf_simple_add_be16(struct net_buf_simple *buf, uint16_t val);
264 void net_buf_simple_add_le24(struct net_buf_simple *buf, uint32_t val);
276 void net_buf_simple_add_be24(struct net_buf_simple *buf, uint32_t val);
288 void net_buf_simple_add_le32(struct net_buf_simple *buf, uint32_t val);
300 void net_buf_simple_add_be32(struct net_buf_simple *buf, uint32_t val);
312 void net_buf_simple_add_le48(struct net_buf_simple *buf, uint64_t val);
324 void net_buf_simple_add_be48(struct net_buf_simple *buf, uint64_t val);
336 void net_buf_simple_add_le64(struct net_buf_simple *buf, uint64_t val);
[all …]
/Zephyr-Core-2.7.6/drivers/sensor/lsm6dso/
Dlsm6dso.c203 const struct sensor_value *val) in lsm6dso_accel_config() argument
208 return lsm6dso_accel_range_set(dev, sensor_ms2_to_g(val)); in lsm6dso_accel_config()
212 return lsm6dso_accel_odr_set(dev, val->val1); in lsm6dso_accel_config()
265 const struct sensor_value *val) in lsm6dso_gyro_config() argument
270 return lsm6dso_gyro_range_set(dev, sensor_rad_to_degrees(val)); in lsm6dso_gyro_config()
274 return lsm6dso_gyro_odr_set(dev, val->val1); in lsm6dso_gyro_config()
287 const struct sensor_value *val) in lsm6dso_attr_set() argument
295 return lsm6dso_accel_config(dev, chan, attr, val); in lsm6dso_attr_set()
297 return lsm6dso_gyro_config(dev, chan, attr, val); in lsm6dso_attr_set()
307 return lsm6dso_shub_config(dev, chan, attr, val); in lsm6dso_attr_set()
[all …]

12345678910>>...22