Home
last modified time | relevance | path

Searched full:tmp (Results 1 – 25 of 288) sorted by relevance

12345678910>>...12

/Zephyr-latest/tests/kernel/common/src/
Dbyteorder.c79 uint64_t val = 0xf0e1d2c3b4a59687, tmp; in ZTEST() local
84 tmp = sys_get_be64(buf); in ZTEST()
86 zassert_equal(tmp, val, "sys_get_be64() failed"); in ZTEST()
102 uint8_t tmp[sizeof(uint64_t)]; in ZTEST() local
104 sys_put_be64(val, tmp); in ZTEST()
106 zassert_mem_equal(tmp, buf, sizeof(uint64_t), "sys_put_be64() failed"); in ZTEST()
118 uint64_t val = 0xf0e1d2c3b4, tmp; in ZTEST() local
121 tmp = sys_get_be40(buf); in ZTEST()
123 zassert_equal(tmp, val, "sys_get_be64() failed"); in ZTEST()
137 uint8_t tmp[sizeof(buf)]; in ZTEST() local
[all …]
/Zephyr-latest/drivers/ethernet/
Deth_enc424j600.c231 uint16_t tmp; in enc424j600_init_filters() local
240 enc424j600_read_sfru(dev, ENC424J600_SFR1_ERXFCONL, &tmp); in enc424j600_init_filters()
241 LOG_DBG("ERXFCON: 0x%04x", tmp); in enc424j600_init_filters()
247 uint16_t tmp; in enc424j600_init_phy() local
257 enc424j600_read_phy(dev, ENC424J600_PSFR_PHANA, &tmp); in enc424j600_init_phy()
258 LOG_DBG("PHANA: 0x%04x", tmp); in enc424j600_init_phy()
261 enc424j600_read_phy(dev, ENC424J600_PSFR_PHCON1, &tmp); in enc424j600_init_phy()
262 tmp |= ENC424J600_PHCON1_RENEG; in enc424j600_init_phy()
263 LOG_DBG("PHCON1: 0x%04x", tmp); in enc424j600_init_phy()
264 enc424j600_write_phy(dev, ENC424J600_PSFR_PHCON1, tmp); in enc424j600_init_phy()
[all …]
Deth_lan9250.c78 uint32_t tmp; in lan9250_wait_ready() local
82 lan9250_read_sys_reg(dev, address, &tmp); in lan9250_wait_ready()
85 if ((tmp & mask) == expected) { in lan9250_wait_ready()
96 uint32_t tmp; in lan9250_read_mac_reg() local
107 lan9250_read_sys_reg(dev, LAN9250_MAC_CSR_DATA, &tmp); in lan9250_read_mac_reg()
109 *value = tmp; in lan9250_read_mac_reg()
131 uint32_t tmp; in lan9250_wait_mac_ready() local
135 lan9250_read_mac_reg(dev, address, &tmp); in lan9250_wait_mac_ready()
138 if ((tmp & mask) == expected) { in lan9250_wait_mac_ready()
148 uint32_t tmp; in lan9250_read_phy_reg() local
[all …]
/Zephyr-latest/drivers/sensor/ams/tmd2620/
Dtmd2620.c83 uint8_t tmp; in tmd2620_sample_fetch() local
103 tmp = TMD2620_ENABLE_PEN | TMD2620_ENABLE_PON; in tmd2620_sample_fetch()
105 ret = i2c_reg_update_byte_dt(&config->i2c, TMD2620_ENABLE_REG, tmp, tmp); in tmd2620_sample_fetch()
115 ret = i2c_reg_read_byte_dt(&config->i2c, TMD2620_STATUS_REG, &tmp); in tmd2620_sample_fetch()
121 LOG_DBG("Status register: 0x%x", tmp); in tmd2620_sample_fetch()
122 if (tmp & TMD2620_STATUS_PINT) { in tmd2620_sample_fetch()
133 tmp = TMD2620_ENABLE_PEN | TMD2620_ENABLE_PON; in tmd2620_sample_fetch()
136 ret = i2c_reg_update_byte_dt(&config->i2c, TMD2620_ENABLE_REG, tmp, 0); in tmd2620_sample_fetch()
173 uint8_t tmp; in tmd2620_sensor_setup() local
197 tmp = config->wait_time_factor; in tmd2620_sensor_setup()
[all …]
/Zephyr-latest/tests/subsys/settings/src/
Dsettings_test_getset_int64.c13 char tmp[64]; in ZTEST() local
27 rc = settings_runtime_get(name, tmp, sizeof(tmp)); in ZTEST()
30 memcpy(&new_val64, tmp, sizeof(int64_t)); in ZTEST()
32 "unexpected value fetched %d", tmp); in ZTEST()
45 rc = settings_runtime_get(name, tmp, sizeof(tmp)); in ZTEST()
48 memcpy(&new_val64, tmp, sizeof(int64_t)); in ZTEST()
50 "unexpected value fetched %d", tmp); in ZTEST()
Dsettings_test_getset_unknown.c14 char tmp[64]; in ZTEST() local
18 rc = settings_runtime_set(name, "tmp", 4); in ZTEST()
24 rc = settings_runtime_get(name, tmp, sizeof(tmp)); in ZTEST()
30 rc = settings_runtime_set(name, "tmp", 4); in ZTEST()
37 rc = settings_runtime_get(name, tmp, sizeof(tmp)); in ZTEST()
Dsettings_empty_lookups.c14 char tmp[64]; in ZTEST() local
17 rc = settings_runtime_set(name, "tmp", 4); in ZTEST()
21 rc = settings_runtime_get(name, tmp, sizeof(tmp)); in ZTEST()
Dsettings_test_getset_int.c13 char tmp[64]; in ZTEST() local
27 rc = settings_runtime_get(name, tmp, sizeof(tmp)); in ZTEST()
30 zassert_equal(42, tmp[0], "unexpected value fetched"); in ZTEST()
/Zephyr-latest/tests/benchmarks/mbedtls/src/
Dbenchmark.c151 mbedtls_strerror(ret, (char *)tmp, sizeof(tmp)); \
152 mbedtls_printf("FAILED: %s\n", tmp); \
291 unsigned char tmp[200]; in main() local
307 memset(tmp, 0xBB, sizeof(tmp)); in main()
312 TIME_AND_TSC("MD5", mbedtls_md5(buf, BUFSIZE, tmp)); in main()
319 mbedtls_ripemd160(buf, BUFSIZE, tmp)); in main()
325 TIME_AND_TSC("SHA-1", mbedtls_sha1(buf, BUFSIZE, tmp)); in main()
332 BUFSIZE, tmp, 0)); in main()
339 BUFSIZE, tmp, 0)); in main()
349 mbedtls_des3_set3key_enc(&des3, tmp); in main()
[all …]
/Zephyr-latest/subsys/net/lib/http/
Dhttp_server_ws.c43 char tmp[64]; in handle_http1_to_websocket_upgrade() local
57 ret = base64_encode(tmp, sizeof(tmp) - 1, &olen, accept, sizeof(accept)); in handle_http1_to_websocket_upgrade()
73 ret = http_server_sendall(client, tmp, strlen(tmp)); in handle_http1_to_websocket_upgrade()
79 ret = snprintk(tmp, sizeof(tmp), "\r\nUser-Agent: %s\r\n\r\n", in handle_http1_to_websocket_upgrade()
81 if (ret < 0 || ret >= sizeof(tmp)) { in handle_http1_to_websocket_upgrade()
85 ret = http_server_sendall(client, tmp, strlen(tmp)); in handle_http1_to_websocket_upgrade()
/Zephyr-latest/subsys/net/lib/lwm2m/
Dlwm2m_rw_plain_text.c184 uint8_t tmp; in plain_text_read_int() local
195 if (buf_read_u8(&tmp, CPKT_BUF_READ(in->in_cpkt), in plain_text_read_int()
200 if (tmp == '-' && accept_sign && i == 0) { in plain_text_read_int()
202 } else if (isdigit(tmp) != 0) { in plain_text_read_int()
203 *value = *value * 10 + (tmp - '0'); in plain_text_read_int()
222 int64_t tmp = 0; in get_s32() local
225 len = plain_text_read_int(in, &tmp, true); in get_s32()
227 *value = (int32_t)tmp; in get_s32()
275 uint8_t tmp, buf[24]; in get_float() local
284 if (buf_read_u8(&tmp, CPKT_BUF_READ(in->in_cpkt), in get_float()
[all …]
/Zephyr-latest/drivers/sensor/maxim/max17055/
Dmax17055.c155 unsigned int tmp; in max17055_channel_get() local
160 tmp = priv->voltage * 1250 / 16; in max17055_channel_get()
161 valp->val1 = tmp / 1000000; in max17055_channel_get()
162 valp->val2 = tmp % 1000000; in max17055_channel_get()
165 tmp = priv->ocv * 1250 / 16; in max17055_channel_get()
166 valp->val1 = tmp / 1000000; in max17055_channel_get()
167 valp->val2 = tmp % 1000000; in max17055_channel_get()
185 tmp = capacity_to_ma(config->rsense_mohms, priv->full_cap); in max17055_channel_get()
186 set_millis(valp, tmp); in max17055_channel_get()
189 tmp = capacity_to_ma(config->rsense_mohms, priv->remaining_cap); in max17055_channel_get()
[all …]
/Zephyr-latest/drivers/display/
Ddisplay_st7789v.c242 uint8_t tmp; local
256 tmp = 0x00;
257 st7789v_transmit(dev, ST7789V_CMD_DGMEN, &tmp, 1);
260 tmp = 0x0f;
261 st7789v_transmit(dev, ST7789V_CMD_FRCTRL2, &tmp, 1);
263 tmp = config->gctrl;
264 st7789v_transmit(dev, ST7789V_CMD_GCTRL, &tmp, 1);
266 tmp = config->vcom;
267 st7789v_transmit(dev, ST7789V_CMD_VCOMS, &tmp, 1);
270 tmp = 0x01;
[all …]
/Zephyr-latest/drivers/can/
Dcan_mcp251xfd.c292 uint32_t tmp; in mcp251xfd_set_tdc() local
298 tmp = FIELD_PREP(MCP251XFD_REG_TDC_TDCMOD_MASK, MCP251XFD_REG_TDC_TDCMOD_AUTO); in mcp251xfd_set_tdc()
299 tmp |= FIELD_PREP(MCP251XFD_REG_TDC_TDCO_MASK, dev_data->tdco); in mcp251xfd_set_tdc()
301 tmp = FIELD_PREP(MCP251XFD_REG_TDC_TDCMOD_MASK, MCP251XFD_REG_TDC_TDCMOD_DISABLED); in mcp251xfd_set_tdc()
304 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_set_tdc()
409 uint32_t tmp; in mcp251xfd_set_timing() local
423 tmp = FIELD_PREP(MCP251XFD_REG_NBTCFG_BRP_MASK, timing->prescaler - 1); in mcp251xfd_set_timing()
424 tmp |= FIELD_PREP(MCP251XFD_REG_NBTCFG_TSEG1_MASK, in mcp251xfd_set_timing()
426 tmp |= FIELD_PREP(MCP251XFD_REG_NBTCFG_TSEG2_MASK, timing->phase_seg2 - 1); in mcp251xfd_set_timing()
427 tmp |= FIELD_PREP(MCP251XFD_REG_NBTCFG_SJW_MASK, timing->sjw - 1); in mcp251xfd_set_timing()
[all …]
/Zephyr-latest/drivers/sensor/maxim/max17262/
Dmax17262.c88 int32_t tmp; in max17262_channel_get() local
93 tmp = data->voltage * VOLTAGE_MULTIPLIER_UV; in max17262_channel_get()
95 valp->val1 = tmp / 1000000; in max17262_channel_get()
96 valp->val2 = tmp % 1000000; in max17262_channel_get()
127 tmp = data->time_to_empty * TIME_MULTIPLIER_MS; in max17262_channel_get()
128 convert_millis(valp, tmp); in max17262_channel_get()
137 tmp = data->time_to_full * TIME_MULTIPLIER_MS; in max17262_channel_get()
138 convert_millis(valp, tmp); in max17262_channel_get()
226 int16_t tmp, hibcfg; in max17262_gauge_init() local
235 rc = max17262_reg_read(dev, STATUS, &tmp); in max17262_gauge_init()
[all …]
/Zephyr-latest/drivers/sensor/ti/ti_hdc/
Dti_hdc.c78 uint64_t tmp; in ti_hdc_channel_get() local
87 tmp = (uint64_t)drv_data->t_sample * 165U; in ti_hdc_channel_get()
88 val->val1 = (int32_t)(tmp >> 16) - 40; in ti_hdc_channel_get()
89 val->val2 = ((tmp & 0xFFFF) * 1000000U) >> 16; in ti_hdc_channel_get()
92 tmp = (uint64_t)drv_data->rh_sample * 100U; in ti_hdc_channel_get()
93 val->val1 = tmp >> 16; in ti_hdc_channel_get()
95 val->val2 = ((tmp & 0xFFFF) * 15625U) >> 10; in ti_hdc_channel_get()
120 uint16_t tmp; in ti_hdc_init() local
131 tmp = read16(&cfg->i2c, TI_HDC_REG_DEVICEID); in ti_hdc_init()
132 if (tmp != TI_HDC1000_DEVID && tmp != TI_HDC1050_DEVID) { in ti_hdc_init()
/Zephyr-latest/subsys/llext/
Dllext.c29 const elf_shdr_t *tmp; in llext_get_section_header() local
32 for (i = 0, tmp = ext->sect_hdrs; in llext_get_section_header()
34 i++, tmp++) { in llext_get_section_header()
37 tmp->sh_name); in llext_get_section_header()
44 *shdr = *tmp; in llext_get_section_header()
255 struct llext *tmp = *ext; in llext_unload() local
261 __ASSERT(tmp->use_count, "A valid LLEXT cannot have a zero use-count!"); in llext_unload()
263 if (tmp->use_count-- != 1) { in llext_unload()
264 unsigned int ret = tmp->use_count; in llext_unload()
271 sys_slist_find_and_remove(&_llext_list, &tmp->_llext_list); in llext_unload()
[all …]
/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/
Dstate_binding.c30 float tmp; in actual_to_linear() local
32 tmp = ((float) val / UINT16_MAX); in actual_to_linear()
34 return (uint16_t) ceiling(UINT16_MAX * tmp * tmp); in actual_to_linear()
81 float tmp; in light_ctl_temp_to_level() local
85 tmp = (temp - ctl->temp->range_min) * UINT16_MAX; in light_ctl_temp_to_level()
87 tmp = tmp / (ctl->temp->range_max - ctl->temp->range_min); in light_ctl_temp_to_level()
89 return (int16_t) (tmp + INT16_MIN); in light_ctl_temp_to_level()
96 uint16_t tmp; in level_to_light_ctl_temp() local
103 tmp = (uint16_t) ((level - INT16_MIN) * diff); in level_to_light_ctl_temp()
105 return (ctl->temp->range_min + tmp); in level_to_light_ctl_temp()
/Zephyr-latest/samples/boards/nxp/mimxrt1170_evk_cm7/magic_addr/src/
Dmain.c43 uint8_t tmp; in main() local
47 tmp = console_getchar(); in main()
48 printf("Writing %c to magic addr...\n", tmp); in main()
49 var = tmp; in main()
/Zephyr-latest/soc/nxp/s32/s32k1/
Dsoc.c54 uint32_t tmp; in soc_early_init_hook() local
61 tmp = IP_MPU->CESR; in soc_early_init_hook()
62 tmp &= ~MPU_CESR_VLD_MASK; in soc_early_init_hook()
63 tmp |= MPU_CESR_SPERR0_MASK | MPU_CESR_SPERR1_MASK in soc_early_init_hook()
65 IP_MPU->CESR = tmp; in soc_early_init_hook()
/Zephyr-latest/tests/crypto/mbedtls_psa/src/
Dmain.c18 uint8_t tmp[64]; in ZTEST_USER() local
21 zassert_equal(psa_generate_random(tmp, sizeof(tmp)), PSA_SUCCESS, in ZTEST_USER()
/Zephyr-latest/include/zephyr/drivers/adc/
Dcurrent_sense_shunt.h44 int64_t tmp = *v_to_i; in current_sense_shunt_scale_dt() local
47 tmp = tmp * 1000000 / spec->shunt_micro_ohms; in current_sense_shunt_scale_dt()
49 *v_to_i = (int32_t)tmp; in current_sense_shunt_scale_dt()
/Zephyr-latest/drivers/adc/
Dadc_lmp90xxx.c725 uint8_t tmp; in lmp90xxx_gpio_set_output() local
733 tmp = data->gpio_dircn | BIT(pin); in lmp90xxx_gpio_set_output()
734 if (tmp != data->gpio_dircn) { in lmp90xxx_gpio_set_output()
735 err = lmp90xxx_write_reg8(dev, LMP90XXX_REG_GPIO_DIRCN, tmp); in lmp90xxx_gpio_set_output()
737 data->gpio_dircn = tmp; in lmp90xxx_gpio_set_output()
750 uint8_t tmp; in lmp90xxx_gpio_set_input() local
758 tmp = data->gpio_dircn & ~BIT(pin); in lmp90xxx_gpio_set_input()
759 if (tmp != data->gpio_dircn) { in lmp90xxx_gpio_set_input()
760 err = lmp90xxx_write_reg8(dev, LMP90XXX_REG_GPIO_DIRCN, tmp); in lmp90xxx_gpio_set_input()
762 data->gpio_dircn = tmp; in lmp90xxx_gpio_set_input()
[all …]
/Zephyr-latest/drivers/sensor/ti/ina219/
Dina219.c108 uint16_t tmp; in ina219_sample_fetch() local
153 rc = ina219_reg_read(dev, INA219_REG_V_BUS, &tmp); in ina219_sample_fetch()
158 data->v_bus = INA219_VBUS_GET(tmp); in ina219_sample_fetch()
164 rc = ina219_reg_read(dev, INA219_REG_POWER, &tmp); in ina219_sample_fetch()
169 data->power = tmp; in ina219_sample_fetch()
175 rc = ina219_reg_read(dev, INA219_REG_CURRENT, &tmp); in ina219_sample_fetch()
180 data->current = tmp; in ina219_sample_fetch()
192 double tmp; in ina219_channel_get() local
197 tmp = data->v_bus * INA219_V_BUS_MUL; in ina219_channel_get()
200 tmp = data->power * cfg->current_lsb * INA219_POWER_MUL * INA219_SI_MUL; in ina219_channel_get()
[all …]
/Zephyr-latest/drivers/sensor/tsic_xx6/
Dtsic_xx6.c161 int64_t tmp; in tsic_xx6_get_value() local
164 tmp = (int64_t)data_bits * in tsic_xx6_get_value()
166 tmp = tmp * 1000000 / (BIT(config->data_bits) - 1); in tsic_xx6_get_value()
167 tmp += (int64_t)config->lower_temperature_limit * 1000000; in tsic_xx6_get_value()
169 data->val.val1 = tmp / 1000000; in tsic_xx6_get_value()
170 data->val.val2 = tmp % 1000000; in tsic_xx6_get_value()
222 uint64_t tmp; in tsic_xx6_get_frame_cycles() local
225 rc = pwm_get_cycles_per_sec(config->pwm.dev, config->pwm.channel, &tmp); in tsic_xx6_get_frame_cycles()
230 if (u64_mul_overflow(tmp, FRAME_BIT_PERIOD_US, &tmp)) { in tsic_xx6_get_frame_cycles()
234 *frame_cycles = tmp / USEC_PER_SEC; in tsic_xx6_get_frame_cycles()

12345678910>>...12