/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/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/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 | dsa_ksz8xxx.c | 110 uint8_t tmp; in dsa_ksz8xxx_port_link_status() local 117 dsa_ksz8xxx_read_reg(pdev, KSZ8XXX_STAT2_PORTn(port), &tmp); in dsa_ksz8xxx_port_link_status() 119 return tmp & KSZ8XXX_STAT2_LINK_GOOD; in dsa_ksz8xxx_port_link_status() 136 uint8_t val[2], tmp; in dsa_ksz8xxx_probe() local 141 for (timeout = 100, tmp = 0; in dsa_ksz8xxx_probe() 142 tmp != KSZ8XXX_CHIP_ID0_ID_DEFAULT && timeout > 0; timeout--) { in dsa_ksz8xxx_probe() 143 dsa_ksz8xxx_read_reg(pdev, KSZ8XXX_CHIP_ID0, &tmp); in dsa_ksz8xxx_probe() 266 uint8_t tmp, i; in dsa_ksz8xxx_switch_setup() local 275 dsa_ksz8xxx_read_reg(pdev, KSZ8863_CTRL2_PORTn(i), &tmp); in dsa_ksz8xxx_switch_setup() 276 tmp |= KSZ8863_CTRL2_TRANSMIT_EN; in dsa_ksz8xxx_switch_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 24 rc = settings_runtime_get(name, tmp, sizeof(tmp)); in ZTEST() 37 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/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/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/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/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/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/kernel/stack/stack/src/ |
D | main.c | 102 stack_data_t tmp[STACK_LEN]; in thread_entry_fn_single() local 107 k_stack_pop((struct k_stack *)p1, &tmp[i - 1], K_NO_WAIT); in thread_entry_fn_single() 109 zassert_false(memcmp(tmp, data1, sizeof(tmp)), in thread_entry_fn_single() 123 stack_data_t tmp[STACK_LEN]; in thread_entry_fn_dual() local 128 k_stack_pop(p2, &tmp[i], K_FOREVER); in thread_entry_fn_dual() 134 zassert_false(memcmp(tmp, data2, sizeof(tmp)), in thread_entry_fn_dual() 163 stack_data_t tmp[STACK_LEN]; in ZTEST_USER() local 184 k_stack_pop(&stack1, &tmp[i - 1], K_NO_WAIT); in ZTEST_USER() 187 zassert_false(memcmp(tmp, data2, sizeof(tmp)), in ZTEST_USER() 200 stack_data_t tmp[STACK_LEN]; in ZTEST_USER() local [all …]
|
/Zephyr-latest/drivers/flash/ |
D | flash_stm32g0x.c | 61 uint32_t tmp; in write_dword() local 90 tmp = regs->CR; in write_dword() 108 uint32_t tmp; in erase_page() local 130 tmp = regs->CR; in erase_page() 139 tmp |= FLASH_CR_BKER; in erase_page() 143 tmp &= ~FLASH_CR_BKER; in erase_page() 149 tmp |= FLASH_CR_PER; in erase_page() 150 tmp &= ~FLASH_CR_PNB_Msk; in erase_page() 151 tmp |= ((page << FLASH_CR_PNB_Pos) & FLASH_CR_PNB_Msk); in erase_page() 154 tmp |= FLASH_CR_STRT; in erase_page() [all …]
|
/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()
|
D | current_sense_amplifier.h | 52 int64_t tmp = *v_to_i; in current_sense_amplifier_scale_dt() local 57 tmp = tmp * 1000 * spec->sense_gain_div / spec->sense_milli_ohms / spec->sense_gain_mult; in current_sense_amplifier_scale_dt() 59 *v_to_i = (int32_t)tmp; in current_sense_amplifier_scale_dt()
|
/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/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/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/samples/subsys/usb/hid-mouse/src/ |
D | main.c | 60 static uint8_t tmp[MOUSE_REPORT_COUNT]; in input_cb() local 67 WRITE_BIT(tmp[MOUSE_BTN_REPORT_IDX], MOUSE_BTN_LEFT, evt->value); in input_cb() 71 WRITE_BIT(tmp[MOUSE_BTN_REPORT_IDX], MOUSE_BTN_RIGHT, evt->value); in input_cb() 75 tmp[MOUSE_X_REPORT_IDX] += 10U; in input_cb() 81 tmp[MOUSE_Y_REPORT_IDX] += 10U; in input_cb() 91 if (k_msgq_put(&mouse_msgq, tmp, K_NO_WAIT) != 0) { in input_cb() 95 tmp[MOUSE_X_REPORT_IDX] = 0U; in input_cb() 96 tmp[MOUSE_Y_REPORT_IDX] = 0U; in input_cb()
|
/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/drivers/sensor/silabs/si7210/ |
D | si7210.c | 373 int64_t tmp; in si7210_channel_get() local 378 tmp = data->temp_sample; in si7210_channel_get() 381 tmp = (-383 * tmp * tmp) / 100 + (160940 * tmp) - 279800000; in si7210_channel_get() 384 tmp = (tmp * (2048 + data->otp_temp_gain)) / 2048; in si7210_channel_get() 385 tmp = tmp + (data->otp_temp_offset * 62500); in si7210_channel_get() 391 tmp -= 732600; in si7210_channel_get() 393 val->val1 = tmp / 1000000; in si7210_channel_get() 394 val->val2 = tmp % 1000000; in si7210_channel_get() 398 tmp = data->mag_sample; in si7210_channel_get() 405 tmp = (tmp - 16384) * 12500; in si7210_channel_get() [all …]
|
/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()
|