/Zephyr-latest/tests/kernel/common/src/ |
D | byteorder.c | 79 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/ |
D | eth_enc424j600.c | 231 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 …]
|
D | eth_lan9250.c | 78 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/ |
D | tmd2620.c | 83 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/ |
D | settings_test_getset_int64.c | 13 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()
|
D | settings_test_getset_unknown.c | 14 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()
|
D | settings_empty_lookups.c | 14 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()
|
D | settings_test_getset_int.c | 13 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/ |
D | benchmark.c | 151 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/ |
D | http_server_ws.c | 43 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/ |
D | lwm2m_rw_plain_text.c | 184 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/ |
D | max17055.c | 155 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/ |
D | display_st7789v.c | 242 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/ |
D | can_mcp251xfd.c | 292 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/ |
D | max17262.c | 88 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/ |
D | ti_hdc.c | 78 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/ |
D | llext.c | 29 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/ |
D | state_binding.c | 30 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/ |
D | main.c | 43 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/ |
D | soc.c | 54 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/ |
D | main.c | 18 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/ |
D | current_sense_shunt.h | 44 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/ |
D | adc_lmp90xxx.c | 725 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/ |
D | ina219.c | 108 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/ |
D | tsic_xx6.c | 161 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()
|