/Zephyr-Core-3.7.0/include/zephyr/usb/ |
D | usb_ch9.h | 340 #define USB_FS_INT_EP_INTERVAL(us) CLAMP(((us) / 1000U), 1U, 255U) 343 #define USB_HS_INT_EP_INTERVAL(us) CLAMP((ilog2((us) / 125U) + 1U), 1U, 16U) 346 #define USB_FS_ISO_EP_INTERVAL(us) CLAMP(((us) / 1000U), 1U, 16U) 349 #define USB_HS_ISO_EP_INTERVAL(us) CLAMP((ilog2((us) / 125U) + 1U), 1U, 16U)
|
/Zephyr-Core-3.7.0/include/zephyr/drivers/usb/ |
D | usb_bc12.h | 61 #define BC12_CURR_UA(val) CLAMP(val, BC12_CHARGER_MIN_CURR_UA, BC12_CHARGER_MAX_CURR_UA)
|
/Zephyr-Core-3.7.0/tests/unit/util/ |
D | main.c | 243 zassert_equal(CLAMP(5, 3, 7), 5, "Unexpected clamp result"); in ZTEST() 244 zassert_equal(CLAMP(3, 3, 7), 3, "Unexpected clamp result"); in ZTEST() 245 zassert_equal(CLAMP(7, 3, 7), 7, "Unexpected clamp result"); in ZTEST() 246 zassert_equal(CLAMP(1, 3, 7), 3, "Unexpected clamp result"); in ZTEST() 247 zassert_equal(CLAMP(8, 3, 7), 7, "Unexpected clamp result"); in ZTEST() 249 zassert_equal(CLAMP(-5, -7, -3), -5, "Unexpected clamp result"); in ZTEST() 250 zassert_equal(CLAMP(-9, -7, -3), -7, "Unexpected clamp result"); in ZTEST() 251 zassert_equal(CLAMP(1, -7, -3), -3, "Unexpected clamp result"); in ZTEST() 253 zassert_equal(CLAMP(0xffffffffaULL, 0xffffffff0ULL, 0xfffffffffULL), in ZTEST()
|
/Zephyr-Core-3.7.0/drivers/timer/ |
D | mcux_os_timer.c | 91 ticks = CLAMP(ticks, 1, counter_get_max_top_value(counter_dev)); in mcux_lpc_ostick_set_counter_timeout() 197 ticks = CLAMP(ticks - 1, 0, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
|
D | mips_cp0_timer.c | 73 ticks = CLAMP(ticks - 1, 0, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
|
D | xtensa_sys_timer.c | 72 ticks = CLAMP(ticks - 1, 0, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
|
D | mtk_adsp_timer.c | 96 uint64_t end = now + CLAMP(ticks - 1, 0, MAX_TICKS) * OST64_PER_TICK; in sys_clock_set_timeout()
|
D | gecko_burtc_timer.c | 128 ticks = CLAMP(ticks - 1, 0, g_max_timeout_ticks); in sys_clock_set_timeout()
|
D | ambiq_stimer.c | 125 ticks = CLAMP(ticks, 1, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
|
D | cc13xx_cc26xx_rtc_timer.c | 197 ticks = CLAMP(ticks - 1, 0, (int32_t) MAX_TICKS); in sys_clock_set_timeout()
|
D | ti_dmtimer.c | 92 ticks = CLAMP(ticks, 1, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
|
D | esp32_sys_timer.c | 90 ticks = CLAMP(ticks - 1, 0, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
|
D | smartbond_timer.c | 130 ticks = CLAMP(ticks - 1, 0, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
|
D | mcux_gpt_timer.c | 144 ticks = CLAMP((ticks - 1), 0, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
|
/Zephyr-Core-3.7.0/drivers/sensor/asahi_kasei/akm09918c/ |
D | akm09918c_decoder.c | 49 *out = CLAMP(intermediate, INT32_MIN, INT32_MAX); in akm09918c_convert_raw_to_q31()
|
/Zephyr-Core-3.7.0/drivers/sensor/sensirion/sgp40/ |
D | sgp40.c | 74 tmp = (int16_t)CLAMP(val->val1, SGP40_COMP_MIN_T, SGP40_COMP_MAX_T); in sgp40_attr_set() 86 tmp = (uint8_t)CLAMP(val->val1, SGP40_COMP_MIN_RH, SGP40_COMP_MAX_RH); in sgp40_attr_set()
|
/Zephyr-Core-3.7.0/soc/renesas/smartbond/da1469x/ |
D | soc.c | 90 reg_cache_len = CLAMP(reg_region_size / KB(64), 0, 0x1ff); in z_renesas_configure_cache()
|
/Zephyr-Core-3.7.0/drivers/can/ |
D | can_common.c | 165 tseg2 = CLAMP(tseg2, min->phase_seg2, max->phase_seg2); in update_sample_pnt() 190 res->prop_seg = CLAMP(tseg1 / 2, min->prop_seg, max->prop_seg); in update_sample_pnt() 313 res->sjw = CLAMP(res->sjw, min->sjw, max->sjw); in can_calc_timing_internal()
|
/Zephyr-Core-3.7.0/drivers/sensor/bosch/bme280/ |
D | bme280_decoder.c | 66 int32_t reading_q31 = CLAMP(reading_round, INT32_MIN, INT32_MAX); in bme280_convert_double_to_q31()
|
/Zephyr-Core-3.7.0/drivers/sensor/amd_sb_tsi/ |
D | sb_tsi_emul.c | 116 reg_value = CLAMP(millicelsius / 125, 0, 0x7ff); in sb_tsi_emul_set_channel()
|
/Zephyr-Core-3.7.0/include/zephyr/sys/ |
D | util.h | 394 #ifndef CLAMP 407 #define CLAMP(val, low, high) (((val) <= (low)) ? (low) : MIN(val, high)) macro
|
/Zephyr-Core-3.7.0/boards/qemu/cortex_m0/ |
D | nrf_timer_timer.c | 175 ticks = CLAMP(ticks - 1, 0, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
|
/Zephyr-Core-3.7.0/drivers/sensor/f75303/ |
D | f75303_emul.c | 134 reg_value = CLAMP(millicelsius / 125, 0, 0x7ff); in f75303_emul_set_channel()
|
/Zephyr-Core-3.7.0/drivers/charger/ |
D | charger_bq24190.c | 356 current_ua = CLAMP(current_ua, BQ24190_REG_CCC_ICHG_MIN_UA, BQ24190_REG_CCC_ICHG_MAX_UA); in bq24190_set_constant_charge_current() 370 voltage_uv = CLAMP(voltage_uv, BQ24190_REG_CVC_VREG_MIN_UV, BQ24190_REG_CVC_VREG_MAX_UV); in bq24190_set_constant_charge_voltage()
|
/Zephyr-Core-3.7.0/subsys/net/lib/zperf/ |
D | zperf_common.c | 45 CLAMP(CONFIG_ZPERF_WORK_Q_THREAD_PRIORITY, K_HIGHEST_APPLICATION_THREAD_PRIO, \
|