/Zephyr-latest/samples/basic/blinky_pwm/src/ |
D | main.c | 25 uint32_t period; in main() local 59 period = max_period; in main() 61 ret = pwm_set_dt(&pwm_led0, period, period / 2U); in main() 66 printk("Using period %d\n", period); in main() 68 period = dir ? (period * 2U) : (period / 2U); in main() 69 if (period > max_period) { in main() 70 period = max_period / 2U; in main() 72 } else if (period < MIN_PERIOD) { in main() 73 period = MIN_PERIOD * 2U; in main()
|
/Zephyr-latest/drivers/watchdog/ |
D | wdt_dw_common.c | 35 uint32_t period; in dw_wdt_configure() local 43 period = config & ~WDT_DW_FLAG_CONFIGURED; in dw_wdt_configure() 46 dw_wdt_timeout_period_init_set(base, period); in dw_wdt_configure() 49 dw_wdt_timeout_period_set(base, period); in dw_wdt_configure() 62 uint32_t period; in dw_wdt_calc_period() local 77 period = period64 - 1; in dw_wdt_calc_period() 78 period = ilog2(period); in dw_wdt_calc_period() 80 if (period >= dw_wdt_cnt_width_get(base)) { in dw_wdt_calc_period() 86 *period_out = WDT_DW_FLAG_CONFIGURED | (period >= 15 ? period - 15 : 0); in dw_wdt_calc_period()
|
/Zephyr-latest/samples/boards/bbc/microbit/sound/src/ |
D | main.c | 24 static uint32_t period; variable 39 pwm_set_dt(&pwm, period, period / 2U); in beep() 64 if (period < PERIOD_MAX) { in button_pressed() 65 period += PWM_USEC(50U); in button_pressed() 69 if (period > PERIOD_MIN) { in button_pressed() 70 period -= PWM_USEC(50U); in button_pressed() 74 printk("Period is %u us (%u Hz)\n", period / NSEC_PER_USEC, in button_pressed() 75 NS_TO_HZ(period)); in button_pressed() 79 NS_TO_HZ(period)); in button_pressed() 99 period = pwm.period; in main()
|
/Zephyr-latest/drivers/pwm/ |
D | pwm_shell.c | 19 uint8_t period; member 27 .period = 3, 36 uint32_t period; in cmd_cycles() local 48 period = strtoul(argv[args_indx.period], NULL, 0); in cmd_cycles() 55 err = pwm_set_cycles(dev, channel, period, pulse, flags); in cmd_cycles() 69 uint32_t period; in cmd_usec() local 81 period = strtoul(argv[args_indx.period], NULL, 0); in cmd_usec() 88 err = pwm_set(dev, channel, PWM_USEC(period), PWM_USEC(pulse), flags); in cmd_usec() 101 uint32_t period; in cmd_nsec() local 113 period = strtoul(argv[args_indx.period], NULL, 0); in cmd_nsec() [all …]
|
D | pwm_capture.c | 15 uint32_t period; member 29 data->period = period_cycles; in z_pwm_capture_cycles_callback() 37 pwm_flags_t flags, uint32_t *period, in z_impl_pwm_capture_cycles() argument 73 if (period != NULL) { in z_impl_pwm_capture_cycles() 74 *period = data.period; in z_impl_pwm_capture_cycles()
|
D | pwm_cc13xx_cc26xx_timer.c | 58 static int set_period_and_pulse(const struct pwm_cc13xx_cc26xx_config *config, uint32_t period, in set_period_and_pulse() argument 68 match_value = period + 1; in set_period_and_pulse() 72 if ((period > PWM_COUNT_MAX) || (period == 0)) { in set_period_and_pulse() 73 LOG_ERR("Period (%d) is out of range.", period); in set_period_and_pulse() 78 if (period < (match_value - 1) || (match_value < 0)) { in set_period_and_pulse() 79 LOG_ERR("Period (%d) is shorter than pulse (%d).", period, pulse); in set_period_and_pulse() 84 write_value(config, period, GPT_O_TBPR, GPT_O_TBILR); in set_period_and_pulse() 98 static int set_cycles(const struct device *dev, uint32_t channel, uint32_t period, uint32_t pulse, in set_cycles() argument 113 set_period_and_pulse(config, period, pulse); in set_cycles()
|
D | pwm_handlers.c | 12 uint32_t channel, uint32_t period, in z_vrfy_pwm_set_cycles() argument 17 period, pulse, flags); in z_vrfy_pwm_set_cycles() 56 uint32_t period; in z_vrfy_pwm_capture_cycles() local 65 flags, &period, &pulse, timeout); in z_vrfy_pwm_capture_cycles() 67 K_OOPS(k_usermode_to_copy(period_cycles, &period, in z_vrfy_pwm_capture_cycles()
|
D | pwm_mcux_pwt.c | 167 uint32_t period; in mcux_pwt_calc_period() local 170 if (u32_add_overflow(high_overflows, low_overflows, &period)) { in mcux_pwt_calc_period() 175 if (u32_mul_overflow(period, 0xFFFFU, &period)) { in mcux_pwt_calc_period() 180 if (u32_add_overflow(period, ppw, &period)) { in mcux_pwt_calc_period() 185 if (u32_add_overflow(period, npw, &period)) { in mcux_pwt_calc_period() 189 *result = period; in mcux_pwt_calc_period() 218 uint32_t period = 0; in mcux_pwt_isr() local 259 &period); in mcux_pwt_isr() 266 LOG_DBG("period = %d, pulse = %d, err = %d", period, pulse, in mcux_pwt_isr() 271 period, pulse, err, data->user_data); in mcux_pwt_isr()
|
D | pwm_intel_blinky.c | 45 float period; in bk_intel_set_cycles() local 55 period = (out_freq * PWM_FREQ_MAX) / cfg->clock_freq; in bk_intel_set_cycles() 56 base_unit = (uint32_t) (period * (1 << PWM_BASE_UNIT_FRACTION)); in bk_intel_set_cycles() 68 if (period >= PWM_FREQ_MAX) { in bk_intel_set_cycles()
|
/Zephyr-latest/subsys/bluetooth/mesh/ |
D | heartbeat.c | 26 uint8_t period; member 61 if (pub.period && pub.count > 1) { in hb_publish_end_cb() 62 k_work_reschedule(&pub_timer, K_SECONDS(pub.period)); in hb_publish_end_cb() 173 if (pub.period == 0U || pub.count == 0U) { in hb_publish() 236 pub.period = 0U; in pub_disable() 296 uint8_t bt_mesh_hb_sub_set(uint16_t src, uint16_t dst, uint32_t period) in bt_mesh_hb_sub_set() argument 309 if (period > (1U << 16)) { in bt_mesh_hb_sub_set() 310 LOG_WRN("Prohibited subscription period %u s", period); in bt_mesh_hb_sub_set() 323 sub.period = 0U; in bt_mesh_hb_sub_set() 324 } else if (period) { in bt_mesh_hb_sub_set() [all …]
|
/Zephyr-latest/samples/basic/fade_led/src/ |
D | main.c | 25 uint32_t step = pwm_led0.period / NUM_STEPS; in main() 43 printk("Using pulse width %d%%\n", 100 * pulse_width / pwm_led0.period); in main() 47 if (pulse_width >= pwm_led0.period) { in main() 48 pulse_width = pwm_led0.period - step; in main()
|
/Zephyr-latest/include/zephyr/drivers/ |
D | pwm.h | 104 uint32_t period; member 157 .period = DT_PWMS_PERIOD_BY_NAME(node_id, name), \ 262 .period = DT_PWMS_PERIOD_BY_IDX(node_id, idx), \ 480 uint32_t period, uint32_t pulse, 484 uint32_t channel, uint32_t period, in z_impl_pwm_set_cycles() argument 490 if (pulse > period) { in z_impl_pwm_set_cycles() 494 return api->set_cycles(dev, channel, period, pulse, flags); in z_impl_pwm_set_cycles() 538 uint32_t period, uint32_t pulse, pwm_flags_t flags) in pwm_set() argument 550 period_cycles = (period * cycles_per_sec) / NSEC_PER_SEC; in pwm_set() 583 static inline int pwm_set_dt(const struct pwm_dt_spec *spec, uint32_t period, in pwm_set_dt() argument [all …]
|
/Zephyr-latest/samples/bluetooth/mesh_demo/src/ |
D | microbit.c | 69 uint32_t period; member 97 return period_map[i].period; in get_period() 107 uint32_t period, duration = 0U; in board_play_tune() local 124 period = get_period(*str, true); in board_play_tune() 127 period = get_period(*str, false); in board_play_tune() 131 if (period) { in board_play_tune() 132 pwm_set(pwm, BUZZER_PWM_CHANNEL, PWM_USEC(period), in board_play_tune() 133 PWM_USEC(period) / 2U, 0); in board_play_tune()
|
/Zephyr-latest/samples/boards/bbc/microbit/sound/boards/ |
D | bbc_microbit_v2.overlay | 3 /* period cell corresponds to initial period */
|
D | bbc_microbit.overlay | 3 /* period cell corresponds to initial period */
|
/Zephyr-latest/subsys/bluetooth/controller/ll_sw/ |
D | ull_scan_internal.h | 16 #define ULL_SCAN_PERIOD_TO_DURATION(period) \ argument 17 ((uint32_t)(period) * EXT_SCAN_PERIOD_UNIT_US / \ 26 #define ULL_SCAN_PERIOD_TO_EVENTS(period, interval) \ argument 27 (((uint32_t)(period) * EXT_SCAN_PERIOD_UNIT_US / \
|
/Zephyr-latest/tests/drivers/pwm/pwm_loopback/src/ |
D | test_pwm_loopback.c | 38 static void test_capture(uint32_t period, uint32_t pulse, enum test_pwm_unit unit, in test_capture() argument 52 pulse, period); in test_capture() 53 err = pwm_set(out.dev, out.pwm, period, pulse, out.flags ^= in test_capture() 59 pulse, period); in test_capture() 60 err = pwm_set(out.dev, out.pwm, PWM_USEC(period), in test_capture() 75 &pulse_capture, K_NSEC(period * 10)); in test_capture() 80 &pulse_capture, K_USEC(period * 10)); in test_capture() 98 zassert_within(period_capture, period, period / 100, in test_capture() 162 uint32_t period; in ZTEST_USER() local 172 &period, &pulse, K_MSEC(1000)); in ZTEST_USER() [all …]
|
/Zephyr-latest/samples/basic/rgb_led/src/ |
D | main.c | 40 for (pulse_red = 0U; pulse_red <= red_pwm_led.period; in main() 49 pulse_green <= green_pwm_led.period; in main() 60 pulse_blue <= blue_pwm_led.period; in main()
|
/Zephyr-latest/kernel/ |
D | timer.c | 55 if (!K_TIMEOUT_EQ(timer->period, K_NO_WAIT) && in z_timer_expiration_handler() 56 !K_TIMEOUT_EQ(timer->period, K_FOREVER)) { in z_timer_expiration_handler() 57 k_timeout_t next = timer->period; in z_timer_expiration_handler() 140 k_timeout_t period) in z_impl_k_timer_start() argument 142 SYS_PORT_TRACING_OBJ_FUNC(k_timer, start, timer, duration, period); in z_impl_k_timer_start() 174 timer->period = period; in z_impl_k_timer_start() 186 k_timeout_t period) in z_vrfy_k_timer_start() argument 189 z_impl_k_timer_start(timer, duration, period); in z_vrfy_k_timer_start()
|
/Zephyr-latest/tests/kernel/timer/timer_behavior/ |
D | Kconfig | 21 int "The number of microseconds to for the timer period" 31 int "Maximum drift in microseconds allowed (should be about 1 period allowance)" 35 int "Maximum drift percentage for the timer period" 38 # difference in the test period is nothing unusual (it can happen for 50 Toggles a GPIO pin, on every period, that can be used by an external 64 int "Maximum timer period drift in PPM for tests using external tool" 67 Parts Per Million of allowed period drift when using an external tool
|
/Zephyr-latest/drivers/led/ |
D | pca9633.c | 63 uint32_t period; in pca9633_led_blink() local 65 period = delay_on + delay_off; in pca9633_led_blink() 67 if (period < dev_data->min_period || period > dev_data->max_period) { in pca9633_led_blink() 77 gdc = delay_on * 256U / period; in pca9633_led_blink() 91 gfrq = (period * 24U / 1000) - 1; in pca9633_led_blink()
|
D | tlc59108.c | 90 uint32_t period; in tlc59108_led_blink() local 92 period = delay_on + delay_off; in tlc59108_led_blink() 98 if (period < dev_data->min_period || period > dev_data->max_period) { in tlc59108_led_blink() 108 gdc = delay_on * 256U / period; in tlc59108_led_blink() 120 gfrq = (period * 24U / 1000) - 1; in tlc59108_led_blink()
|
/Zephyr-latest/samples/subsys/rtio/sensor_batch_processing/ |
D | app.overlay | 15 sample-period = <100>; 24 sample-period = <120>;
|
/Zephyr-latest/include/zephyr/devicetree/ |
D | pwms.h | 249 DT_PWMS_CELL_BY_IDX(node_id, idx, period) 266 DT_PWMS_CELL_BY_NAME(node_id, name, period) 424 DT_INST_PWMS_CELL_BY_IDX(inst, idx, period) 435 DT_INST_PWMS_CELL_BY_NAME(inst, name, period)
|
/Zephyr-latest/include/zephyr/bluetooth/mesh/ |
D | heartbeat.h | 47 uint32_t period; member 53 uint32_t period; member
|