/Zephyr-latest/drivers/sensor/maxim/max31855/ |
D | max31855.c | 63 uint32_t temp = sys_be32_to_cpu(data->sample); in max31855_channel_get() local 65 if (temp & BIT(16)) { in max31855_channel_get() 72 temp = (temp >> THERMOCOUPLE_TEMPERATURE_POS) & 0x3fff; in max31855_channel_get() 75 if (temp & BIT(14)) { in max31855_channel_get() 76 temp |= THERMOCOUPLE_SIGN_BITS; in max31855_channel_get() 79 temp = temp * THERMOCOUPLE_RESOLUTION; in max31855_channel_get() 81 val->val1 = temp / 100; in max31855_channel_get() 82 val->val2 = (temp - val->val1 * 100) * 10000; in max31855_channel_get() 86 temp = (temp >> INTERNAL_TEMPERATURE_POS) & 0xfff; in max31855_channel_get() 89 if (temp & BIT(12)) { in max31855_channel_get() [all …]
|
/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/ |
D | main.c | 32 ctl->temp->range_min = TEMP_MIN; in light_default_var_init() 33 ctl->temp->range_max = TEMP_MAX; in light_default_var_init() 34 ctl->temp->def = TEMP_MAX; in light_default_var_init() 35 ctl->temp->target = ctl->temp->def; in light_default_var_init() 51 if (ctl->temp->range) { in light_default_status_init() 52 ctl->temp->range_max = (uint16_t) (ctl->temp->range >> 16); in light_default_status_init() 53 ctl->temp->range_min = (uint16_t) ctl->temp->range; in light_default_status_init() 60 ctl->temp->def = constrain_temperature(ctl->temp->def); in light_default_status_init() 61 ctl->temp->target = constrain_temperature(ctl->temp->target); in light_default_status_init() 63 ctl->temp->current = ctl->temp->def; in light_default_status_init() [all …]
|
D | storage.c | 37 settings_save_one("ps/td", &ctl->temp->def, sizeof(ctl->temp->def)); in save_def_states() 53 settings_save_one("ps/tlt", &ctl->temp->target, in save_last_target_states() 54 sizeof(ctl->temp->target)); in save_last_target_states() 71 ctl->temp->range = (uint32_t) ((ctl->temp->range_max << 16) | in save_temperature_range() 72 ctl->temp->range_min); in save_temperature_range() 74 settings_save_one("ps/tr", &ctl->temp->range, sizeof(ctl->temp->range)); in save_temperature_range() 145 len = read_cb(cb_arg, &ctl->temp->def, in ps_set() 146 sizeof(ctl->temp->def)); in ps_set() 165 len = read_cb(cb_arg, &ctl->temp->target, in ps_set() 166 sizeof(ctl->temp->target)); in ps_set() [all …]
|
/Zephyr-latest/tests/arch/arc/arc_dsp_sharing/src/ |
D | dsp_regs_arc.h | 36 uint32_t *temp = (uint32_t *)regs; in _load_all_dsp_registers() local 38 z_arc_v2_aux_reg_write(_ARC_V2_DSP_BFLY0, *temp++); in _load_all_dsp_registers() 39 z_arc_v2_aux_reg_write(_ARC_V2_AGU_AP0, *temp++); in _load_all_dsp_registers() 40 z_arc_v2_aux_reg_write(_ARC_V2_AGU_OS0, *temp++); in _load_all_dsp_registers() 56 uint32_t *temp = (uint32_t *)regs; in _store_all_dsp_registers() local 58 *temp++ = z_arc_v2_aux_reg_read(_ARC_V2_DSP_BFLY0); in _store_all_dsp_registers() 59 *temp++ = z_arc_v2_aux_reg_read(_ARC_V2_AGU_AP0); in _store_all_dsp_registers() 60 *temp++ = z_arc_v2_aux_reg_read(_ARC_V2_AGU_OS0); in _store_all_dsp_registers()
|
/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/ |
D | state_binding.c | 68 uint16_t constrain_temperature(uint16_t temp) in constrain_temperature() argument 70 if (temp < ctl->temp->range_min) { in constrain_temperature() 71 temp = ctl->temp->range_min; in constrain_temperature() 72 } else if (temp > ctl->temp->range_max) { in constrain_temperature() 73 temp = ctl->temp->range_max; in constrain_temperature() 76 return temp; in constrain_temperature() 79 static int16_t light_ctl_temp_to_level(uint16_t temp) in light_ctl_temp_to_level() argument 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() 100 diff = (float) (ctl->temp->range_max - ctl->temp->range_min) / in level_to_light_ctl_temp() [all …]
|
D | transition.c | 125 ctl->temp->delta = in set_transition_values() 126 ((float) (ctl->temp->current - ctl->temp->target) / in set_transition_values() 134 ctl->temp->delta = in set_transition_values() 135 ((float) (ctl->temp->current - ctl->temp->target) / in set_transition_values() 139 ctl->temp->delta = in set_transition_values() 140 ((float) (ctl->temp->current - ctl->temp->target) / in set_transition_values() 243 int temp; in level_move_temp_work_handler() local 245 temp = 0; in level_move_temp_work_handler() 247 if (ctl->temp->current) { in level_move_temp_work_handler() 248 temp = ctl->temp->current + ctl->temp->delta; in level_move_temp_work_handler() [all …]
|
/Zephyr-latest/samples/subsys/zbus/work_queue/ |
D | README.rst | 28 I: Sensor msg processed by CALLBACK fh1: temp = 10, press = 1, humidity = 100 29 I: Sensor msg processed by CALLBACK fh2: temp = 10, press = 1, humidity = 100 30 I: Sensor msg processed by CALLBACK fh3: temp = 10, press = 1, humidity = 100 31 I: Sensor msg processed by WORK QUEUE handler dh1: temp = 10, press = 1, humidity = 100 32 I: Sensor msg processed by WORK QUEUE handler dh2: temp = 10, press = 1, humidity = 100 33 I: Sensor msg processed by WORK QUEUE handler dh3: temp = 10, press = 1, humidity = 100 34 I: Sensor msg processed by THREAD handler 1: temp = 10, press = 1, humidity = 100 35 I: Sensor msg processed by THREAD handler 2: temp = 10, press = 1, humidity = 100 36 I: Sensor msg processed by THREAD handler 3: temp = 10, press = 1, humidity = 100 37 I: Sensor msg processed by CALLBACK fh1: temp = 20, press = 2, humidity = 200 [all …]
|
/Zephyr-latest/samples/sensor/thermometer/src/ |
D | main.c | 37 double temp; in temp_alert_handler() local 45 temp = sensor_value_to_double(&value); in temp_alert_handler() 46 if (temp <= low_temp) { in temp_alert_handler() 47 printf("Temperature below threshold: %0.1f°C\n", temp); in temp_alert_handler() 48 } else if (temp >= high_temp) { in temp_alert_handler() 49 printf("Temperature above threshold: %0.1f°C\n", temp); in temp_alert_handler() 59 double temp; in main() local 81 temp = sensor_value_to_double(&value); in main() 84 low_temp = temp + 0.5; in main() 97 high_temp = temp + 1.5; in main()
|
/Zephyr-latest/include/zephyr/arch/common/ |
D | sys_bitops.h | 26 uint32_t temp = *(volatile uint32_t *)addr; in sys_set_bit() local 28 *(volatile uint32_t *)addr = temp | (1 << bit); in sys_set_bit() 33 uint32_t temp = *(volatile uint32_t *)addr; in sys_clear_bit() local 35 *(volatile uint32_t *)addr = temp & ~(1 << bit); in sys_clear_bit() 40 uint32_t temp = *(volatile uint32_t *)addr; in sys_test_bit() local 42 return temp & (1 << bit); in sys_test_bit() 47 uint32_t temp = *(volatile uint32_t *)addr; in sys_set_bits() local 49 *(volatile uint32_t *)addr = temp | mask; in sys_set_bits() 54 uint32_t temp = *(volatile uint32_t *)addr; in sys_clear_bits() local 56 *(volatile uint32_t *)addr = temp & ~mask; in sys_clear_bits()
|
/Zephyr-latest/soc/infineon/cat3/xmc4xxx/ |
D | soc.c | 22 uint32_t temp; in soc_reset_hook() local 29 temp = FLASH0->FCON; in soc_reset_hook() 30 temp &= ~FLASH_FCON_WSPFLASH_Msk; in soc_reset_hook() 31 temp |= PMU_FLASH_WS; in soc_reset_hook() 32 FLASH0->FCON = temp; in soc_reset_hook()
|
/Zephyr-latest/samples/sensor/dht_polling/ |
D | README.rst | 50 hs300x@44: temp is 25.31 °C humidity is 30.39 %RH 51 hs300x@44: temp is 25.51 °C humidity is 30.44 %RH 52 hs300x@44: temp is 25.51 °C humidity is 30.37 %RH 53 hs300x@44: temp is 25.51 °C humidity is 30.39 %RH 54 hs300x@44: temp is 25.31 °C humidity is 30.37 %RH 55 hs300x@44: temp is 25.31 °C humidity is 30.35 %RH 56 hs300x@44: temp is 25.51 °C humidity is 30.37 %RH 57 hs300x@44: temp is 25.51 °C humidity is 30.37 %RH 58 hs300x@44: temp is 25.51 °C humidity is 30.39 %RH 59 hs300x@44: temp is 25.51 °C humidity is 30.44 %RH [all …]
|
/Zephyr-latest/samples/sensor/jc42/src/ |
D | main.c | 44 const struct sensor_value *temp) in set_window() argument 46 const int temp_ucel = temp->val1 * UCEL_PER_CEL + temp->val2; in set_window() 85 struct sensor_value temp; in trigger_handler() local 95 rc = sensor_channel_get(dev, SENSOR_CHAN_AMBIENT_TEMP, &temp); in trigger_handler() 102 sensor_value_to_double(&temp)); in trigger_handler() 103 set_window(dev, &temp); in trigger_handler() 137 struct sensor_value temp; in main() local 145 rc = sensor_channel_get(dev, SENSOR_CHAN_AMBIENT_TEMP, &temp); in main() 152 sensor_value_to_double(&temp)); in main()
|
/Zephyr-latest/samples/sensor/grove_temperature/src/ |
D | main.c | 23 struct sensor_value temp; in main() local 53 sensor_channel_get(dev, SENSOR_CHAN_AMBIENT_TEMP, &temp); in main() 68 sensor_value_to_double(&temp), in main() 71 sprintf(row, "T:%d%cC", temp.val1, in main() 79 printf("Temperature: %.2f C\n", sensor_value_to_double(&temp)); in main() 81 printk("Temperature: %d\n", temp.val1); in main()
|
/Zephyr-latest/drivers/sensor/lm75/ |
D | lm75.c | 36 int16_t temp; member 108 static void lm75_sensor_value_to_temp(const struct sensor_value *val, int16_t *temp) in lm75_sensor_value_to_temp() argument 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() 116 static void lm75_temp_to_sensor_value(int16_t temp, struct sensor_value *val) in lm75_temp_to_sensor_value() argument 119 temp = (temp / 128) * 10 / 2; in lm75_temp_to_sensor_value() 122 val->val1 = temp / 10; in lm75_temp_to_sensor_value() 125 val->val2 = (temp - val->val1 * 10) * 100000U; in lm75_temp_to_sensor_value() 131 int16_t temp = 0; in lm75_attr_set() local [all …]
|
/Zephyr-latest/tests/lib/cmsis_dsp/filtering/src/ |
D | misc_q15.c | 140 q15_t *temp; in test_arm_conv_partial_q15() local 145 temp = calloc(ref_length, sizeof(q15_t)); in test_arm_conv_partial_q15() 155 memcpy(temp, &output[first], ref_length * sizeof(q15_t)); in test_arm_conv_partial_q15() 159 test_snr_error_q15(ref_length, ref, temp, SNR_ERROR_THRESH), in test_arm_conv_partial_q15() 163 test_near_equal_q15(ref_length, ref, temp, in test_arm_conv_partial_q15() 169 free(temp); in test_arm_conv_partial_q15() 177 q15_t *temp; in test_arm_conv_partial_fast_q15() local 182 temp = calloc(ref_length, sizeof(q15_t)); in test_arm_conv_partial_fast_q15() 192 memcpy(temp, &output[first], ref_length * sizeof(q15_t)); in test_arm_conv_partial_fast_q15() 196 test_snr_error_q15(ref_length, ref, temp, SNR_ERROR_THRESH), in test_arm_conv_partial_fast_q15() [all …]
|
/Zephyr-latest/drivers/sensor/silabs/si7055/ |
D | si7055.c | 42 uint8_t temp[SI7055_TEMPERATURE_READ_WITH_CHECKSUM_SIZE]; in si7055_get_temperature() local 44 uint8_t temp[SI7055_TEMPERATURE_READ_NO_CHECKSUM_SIZE]; in si7055_get_temperature() local 48 temp, sizeof(temp)); in si7055_get_temperature() 56 if (crc8(temp, SI7055_DATA_SIZE, SI7055_CRC_POLY, in si7055_get_temperature() 57 SI7055_CRC_INIT, false) != temp[SI7055_DATA_SIZE]){ in si7055_get_temperature() 62 si_data->temperature = (temp[SI7055_TEMPERATURE_DATA_BYTE_0] in si7055_get_temperature() 64 temp[SI7055_TEMPERATURE_DATA_BYTE_1]; in si7055_get_temperature()
|
/Zephyr-latest/samples/net/cloud/tagoio_http_post/src/ |
D | main.c | 40 float temp; in collect_data() local 43 temp = ((sys_rand32_get() % (upper - lower + 1)) + lower); in collect_data() 44 temp /= base; in collect_data() 49 (double)temp); in collect_data() 52 LOG_INF("Temp: %d", (int) temp); in collect_data()
|
/Zephyr-latest/drivers/sensor/lm77/ |
D | lm77.c | 56 int16_t temp; member 102 static void lm77_sensor_value_to_temp(const struct sensor_value *val, int16_t *temp) in lm77_sensor_value_to_temp() argument 105 *temp = val->val1 << 1; in lm77_sensor_value_to_temp() 108 *temp += (val->val2 * 2) / 1000000; in lm77_sensor_value_to_temp() 111 *temp <<= 3; in lm77_sensor_value_to_temp() 114 static void lm77_temp_to_sensor_value(int16_t temp, struct sensor_value *val) in lm77_temp_to_sensor_value() argument 117 temp = (temp >> 3) * 5; in lm77_temp_to_sensor_value() 120 val->val1 = temp / 10; in lm77_temp_to_sensor_value() 123 val->val2 = temp % 10; in lm77_temp_to_sensor_value() 130 int16_t temp = 0; in lm77_attr_set() local [all …]
|
/Zephyr-latest/tests/subsys/dfu/mcuboot/src/ |
D | main.c | 28 uint32_t temp; in ZTEST() local 39 for (offs = 0; offs < fa->fa_size; offs += sizeof(temp)) { in ZTEST() 40 ret = flash_area_read(fa, offs, &temp, sizeof(temp)); in ZTEST() 42 if (temp == 0xFFFFFFFF) { in ZTEST() 43 ret = flash_area_write(fa, offs, &temp2, sizeof(temp)); in ZTEST() 51 for (offs = 0; offs < fa->fa_size; offs += sizeof(temp)) { in ZTEST() 52 ret = flash_area_read(fa, offs, &temp, sizeof(temp)); in ZTEST() 54 zassert(temp == 0xFFFFFFFF, "pass", "fail"); in ZTEST()
|
/Zephyr-latest/drivers/sensor/apds9306/ |
D | apds9306.c | 140 uint8_t temp; in apds9306_attr_set() local 150 temp = FIELD_PREP(0x07, value->val1); in apds9306_attr_set() 154 temp = FIELD_PREP(0x07, value->val1); in apds9306_attr_set() 158 temp = FIELD_PREP(0x07, value->val1) << 0x04; in apds9306_attr_set() 163 if (i2c_reg_update_byte_dt(&config->i2c, reg, mask, temp)) { in apds9306_attr_set() 175 uint8_t temp; in apds9306_attr_get() local 196 if (i2c_reg_read_byte_dt(&config->i2c, reg, &temp)) { in apds9306_attr_get() 201 value->val1 = (temp >> mask) & 0x07; in apds9306_attr_get() 268 uint8_t temp; in apds9306_sensor_setup() local 274 if (i2c_reg_read_byte_dt(&config->i2c, APDS9306_REGISTER_MAIN_STATUS, &temp)) { in apds9306_sensor_setup() [all …]
|
/Zephyr-latest/drivers/serial/ |
D | uart_hvc_xen_consoleio.c | 26 char temp; in xen_consoleio_poll_in() local 28 ret = HYPERVISOR_console_io(CONSOLEIO_read, sizeof(temp), &temp); in xen_consoleio_poll_in() 34 *c = temp; in xen_consoleio_poll_in()
|
/Zephyr-latest/samples/bluetooth/bthome_sensor_template/src/ |
D | main.c | 57 int temp = 0; in main() local 70 service_data[IDX_TEMPH] = (temp * 100) >> 8; in main() 71 service_data[IDX_TEMPL] = (temp * 100) & 0xff; in main() 72 if (temp++ == 25) { in main() 73 temp = 0; in main()
|
/Zephyr-latest/tests/kernel/fpu_sharing/generic/src/ |
D | float_regs_arc_gcc.h | 41 uint32_t temp = 0; in _load_all_float_registers() local 52 : : "r" (regs), "r" (temp), in _load_all_float_registers() 74 uint32_t temp = 0; in _store_all_float_registers() local 85 : : "r" (regs), "r" (temp), in _store_all_float_registers()
|
/Zephyr-latest/samples/sensor/ms5837/src/ |
D | main.c | 39 struct sensor_value temp; in main() local 43 sensor_channel_get(dev, SENSOR_CHAN_AMBIENT_TEMP, &temp); in main() 46 printf("Temperature: %d.%06d, Pressure: %d.%06d\n", temp.val1, in main() 47 temp.val2, press.val1, press.val2); in main()
|
/Zephyr-latest/samples/sensor/ds18b20/src/ |
D | main.c | 47 struct sensor_value temp; in main() local 55 res = sensor_channel_get(dev, SENSOR_CHAN_AMBIENT_TEMP, &temp); in main() 61 printk("Temp: %d.%06d\n", temp.val1, temp.val2); in main()
|