/Zephyr-Core-2.7.6/samples/basic/blinky_pwm/src/ |
D | main.c | 37 uint32_t period; in main() local 72 period = max_period; in main() 75 period, period / 2U, PWM_FLAGS); in main() 81 period = dir ? (period * 2U) : (period / 2U); in main() 82 if (period > max_period) { in main() 83 period = max_period / 2U; in main() 85 } else if (period < MIN_PERIOD_USEC) { in main() 86 period = MIN_PERIOD_USEC * 2U; in main()
|
/Zephyr-Core-2.7.6/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_pin_set_cycles(dev, pwm, 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_pin_set_usec(dev, pwm, period, 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 30 data->period = period_cycles; in z_pwm_pin_capture_cycles_callback() 38 pwm_flags_t flags, uint32_t *period, in z_impl_pwm_pin_capture_cycles() argument 75 if (period != NULL) { in z_impl_pwm_pin_capture_cycles() 76 *period = data.period; in z_impl_pwm_pin_capture_cycles()
|
D | pwm_mcux_pwt.c | 150 uint32_t period; in mcux_pwt_calc_period() local 153 if (u32_add_overflow(high_overflows, low_overflows, &period)) { in mcux_pwt_calc_period() 158 if (u32_mul_overflow(period, 0xFFFFU, &period)) { in mcux_pwt_calc_period() 163 if (u32_add_overflow(period, ppw, &period)) { in mcux_pwt_calc_period() 168 if (u32_add_overflow(period, npw, &period)) { in mcux_pwt_calc_period() 172 *result = period; in mcux_pwt_calc_period() 201 uint32_t period = 0; in mcux_pwt_isr() local 242 &period); in mcux_pwt_isr() 249 LOG_DBG("period = %d, pulse = %d, err = %d", period, pulse, in mcux_pwt_isr() 254 period, pulse, err, data->user_data); in mcux_pwt_isr()
|
D | pwm_handlers.c | 13 uint32_t period, uint32_t pulse, in z_vrfy_pwm_pin_set_cycles() argument 18 period, in z_vrfy_pwm_pin_set_cycles() 58 uint32_t period; in z_vrfy_pwm_pin_capture_cycles() local 67 flags, &period, &pulse, timeout); in z_vrfy_pwm_pin_capture_cycles() 69 Z_OOPS(z_user_to_copy(period_cycles, &period, in z_vrfy_pwm_pin_capture_cycles()
|
/Zephyr-Core-2.7.6/samples/boards/bbc_microbit/sound/src/ |
D | main.c | 28 static uint32_t period = PERIOD_INIT; variable 37 pwm_pin_set_usec(pwm, BUZZER_PIN, period, period / 2U, 0); in beep() 62 if (period < PERIOD_MAX) { in button_pressed() 63 period += 50U; in button_pressed() 67 if (period > PERIOD_MIN) { in button_pressed() 68 period -= 50U; in button_pressed() 72 printk("Period is %u us (%u Hz)\n", period, US_TO_HZ(period)); in button_pressed() 76 US_TO_HZ(period)); in button_pressed()
|
/Zephyr-Core-2.7.6/subsys/bluetooth/mesh/ |
D | heartbeat.c | 24 uint8_t period; member 50 if (pub.period && pub.count > 1) { in hb_publish_end_cb() 51 k_work_reschedule(&pub_timer, K_SECONDS(pub.period)); in hb_publish_end_cb() 158 if (pub.period == 0U || pub.count == 0U) { in hb_publish() 223 pub.period = 0U; in pub_disable() 280 uint8_t bt_mesh_hb_sub_set(uint16_t src, uint16_t dst, uint32_t period) in bt_mesh_hb_sub_set() argument 293 if (period > (1U << 16)) { in bt_mesh_hb_sub_set() 294 BT_WARN("Prohibited subscription period %u s", period); in bt_mesh_hb_sub_set() 307 sub.period = 0U; in bt_mesh_hb_sub_set() 308 } else if (period) { in bt_mesh_hb_sub_set() [all …]
|
D | access.c | 44 uint8_t period; member 80 int32_t period; in bt_mesh_model_pub_period_get() local 86 switch (mod->pub->period >> 6) { in bt_mesh_model_pub_period_get() 89 period = (mod->pub->period & BIT_MASK(6)) * 100U; in bt_mesh_model_pub_period_get() 93 period = (mod->pub->period & BIT_MASK(6)) * MSEC_PER_SEC; in bt_mesh_model_pub_period_get() 97 period = (mod->pub->period & BIT_MASK(6)) * 10U * MSEC_PER_SEC; in bt_mesh_model_pub_period_get() 101 period = (mod->pub->period & BIT_MASK(6)) * 600U * MSEC_PER_SEC; in bt_mesh_model_pub_period_get() 108 return period >> mod->pub->period_div; in bt_mesh_model_pub_period_get() 110 return period; in bt_mesh_model_pub_period_get() 117 uint32_t elapsed, period; in next_period() local [all …]
|
/Zephyr-Core-2.7.6/kernel/ |
D | timer.c | 35 if (!K_TIMEOUT_EQ(timer->period, K_NO_WAIT) && in z_timer_expiration_handler() 36 !K_TIMEOUT_EQ(timer->period, K_FOREVER)) { in z_timer_expiration_handler() 38 timer->period); in z_timer_expiration_handler() 97 k_timeout_t period) in z_impl_k_timer_start() argument 118 if (!K_TIMEOUT_EQ(period, K_FOREVER) && period.ticks != 0 && in z_impl_k_timer_start() 119 Z_TICK_ABS(period.ticks) < 0) { in z_impl_k_timer_start() 120 period.ticks = MAX(period.ticks - 1, 1); in z_impl_k_timer_start() 127 timer->period = period; in z_impl_k_timer_start() 137 k_timeout_t period) in z_vrfy_k_timer_start() argument 140 z_impl_k_timer_start(timer, duration, period); in z_vrfy_k_timer_start()
|
/Zephyr-Core-2.7.6/include/drivers/ |
D | pwm.h | 182 uint32_t period, uint32_t pulse, pwm_flags_t flags); 186 uint32_t period, uint32_t pulse, in z_impl_pwm_pin_set_cycles() argument 192 return api->pin_set(dev, pwm, period, pulse, flags); in z_impl_pwm_pin_set_cycles() 334 uint32_t *period, 375 uint32_t period, uint32_t pulse, in pwm_pin_set_usec() argument 384 period_cycles = (period * cycles_per_sec) / USEC_PER_SEC; in pwm_pin_set_usec() 411 uint32_t period, uint32_t pulse, in pwm_pin_set_nsec() argument 420 period_cycles = (period * cycles_per_sec) / NSEC_PER_SEC; in pwm_pin_set_nsec() 525 uint64_t *period, in pwm_pin_capture_usec() argument 539 err = pwm_pin_cycles_to_usec(dev, pwm, period_cycles, period); in pwm_pin_capture_usec() [all …]
|
/Zephyr-Core-2.7.6/tests/drivers/pwm/pwm_loopback/src/ |
D | test_pwm_loopback.c | 38 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_pin_set_nsec(out.dev, out.pwm, period, in test_capture() 59 pulse, period); in test_capture() 60 err = pwm_pin_set_usec(out.dev, out.pwm, period, in test_capture() 75 K_NSEC(period * 10)); in test_capture() 81 K_USEC(period * 10)); in test_capture() 97 zassert_within(period_capture, period, period / 100, in test_capture() 103 zassert_within(pulse_capture, period - pulse, in test_capture() 104 (period - pulse) / 100, in test_capture() [all …]
|
/Zephyr-Core-2.7.6/samples/bluetooth/mesh_demo/src/ |
D | microbit.c | 70 uint32_t period; member 98 return period_map[i].period; in get_period() 108 uint32_t period, duration = 0U; in board_play_tune() local 125 period = get_period(*str, true); in board_play_tune() 128 period = get_period(*str, false); in board_play_tune() 132 if (period) { in board_play_tune() 133 pwm_pin_set_usec(pwm, BUZZER_PIN, period, period / 2U, in board_play_tune()
|
/Zephyr-Core-2.7.6/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 / \
|
D | ull_scan.c | 60 uint16_t period, struct ll_scan_set **scan, 63 uint16_t duration, uint16_t period, 130 uint8_t ll_scan_enable(uint8_t enable, uint16_t duration, uint16_t period) argument 164 is_update_1m = is_scan_update(SCAN_HANDLE_1M, duration, period, 177 duration, period, &scan_coded, 201 err = duration_period_setup(scan, duration, period, 210 err = duration_period_setup(scan_coded, duration, period, 749 uint16_t period, struct ll_scan_set **scan, argument 754 return duration && period && (*scan)->lll.duration_reload && 759 uint16_t duration, uint16_t period, argument [all …]
|
/Zephyr-Core-2.7.6/drivers/led/ |
D | pca9633.c | 61 uint32_t period; in pca9633_led_blink() local 63 period = delay_on + delay_off; in pca9633_led_blink() 65 if (period < dev_data->min_period || period > dev_data->max_period) { in pca9633_led_blink() 75 gdc = delay_on * 256U / period; in pca9633_led_blink() 89 gfrq = (period * 24U / 1000) - 1; in pca9633_led_blink()
|
D | tlc59108.c | 94 uint32_t period; in tlc59108_led_blink() local 96 period = delay_on + delay_off; in tlc59108_led_blink() 102 if (period < dev_data->min_period || period > dev_data->max_period) { in tlc59108_led_blink() 112 gdc = delay_on * 256U / period; in tlc59108_led_blink() 126 gfrq = (period * 24U / 1000) - 1; in tlc59108_led_blink()
|
D | led_pwm.c | 28 uint32_t period; member 77 pulse = led_pwm->period * value / 100; in led_pwm_set_brightness() 80 led_pwm->period, pulse, led_pwm->flags); in led_pwm_set_brightness() 163 .period = DT_PHA_OR(led_node_id, pwms, period, 100), \
|
D | lp3943.c | 129 uint16_t period; in lp3943_led_blink() local 132 period = delay_on + delay_off; in lp3943_led_blink() 134 if (period < dev_data->min_period || period > dev_data->max_period) { in lp3943_led_blink() 151 val = (period * 255U) / dev_data->max_period; in lp3943_led_blink()
|
/Zephyr-Core-2.7.6/tests/drivers/pwm/pwm_api/src/ |
D | test_pwm.c | 104 static int test_task(uint32_t port, uint32_t period, uint32_t pulse, uint8_t unit) in test_task() argument 107 port, period, pulse); in test_task() 118 if (pwm_pin_set_cycles(pwm_dev, port, period, pulse, 0)) { in test_task() 124 if (pwm_pin_set_usec(pwm_dev, port, period, pulse, 0)) { in test_task() 130 if (pwm_pin_set_nsec(pwm_dev, port, period, pulse, 0)) { in test_task()
|
/Zephyr-Core-2.7.6/drivers/timer/ |
D | cc13x2_cc26x2_rtc_timer.c | 149 uint64_t period; in startDevice() local 164 period = RTC_COUNTS_PER_TICK; in startDevice() 165 if (period < 0x40000) { in startDevice() 169 compare = period >> 16; in startDevice()
|
/Zephyr-Core-2.7.6/include/bluetooth/mesh/ |
D | heartbeat.h | 44 uint32_t period; member 50 uint32_t period; member
|
/Zephyr-Core-2.7.6/boards/posix/native_posix/ |
D | hw_counter.c | 52 void hw_counter_set_period(uint64_t period) in hw_counter_set_period() argument 54 counter_period = period; in hw_counter_set_period()
|
/Zephyr-Core-2.7.6/drivers/i2c/ |
D | i2c_esp32.c | 144 uint32_t period; in i2c_esp32_configure_speed() local 156 period = (sys_clk_freq / freq_hz); in i2c_esp32_configure_speed() 157 period /= 2U; /* Set hold and setup times to 1/2th of period */ in i2c_esp32_configure_speed() 159 esp32_set_mask32(period << I2C_SCL_LOW_PERIOD_S, in i2c_esp32_configure_speed() 161 esp32_set_mask32(period << I2C_SCL_HIGH_PERIOD_S, in i2c_esp32_configure_speed() 164 esp32_set_mask32(period << I2C_SCL_START_HOLD_TIME_S, in i2c_esp32_configure_speed() 166 esp32_set_mask32(period << I2C_SCL_RSTART_SETUP_TIME_S, in i2c_esp32_configure_speed() 168 esp32_set_mask32(period << I2C_SCL_STOP_HOLD_TIME_S, in i2c_esp32_configure_speed() 170 esp32_set_mask32(period << I2C_SCL_STOP_SETUP_TIME_S, in i2c_esp32_configure_speed() 173 period /= 2U; /* Set sample and hold times to 1/4th of period */ in i2c_esp32_configure_speed() [all …]
|
/Zephyr-Core-2.7.6/include/devicetree/ |
D | pwms.h | 334 DT_PWMS_CELL_BY_IDX(node_id, idx, period) 351 DT_PWMS_CELL_BY_NAME(node_id, name, period) 542 DT_INST_PWMS_CELL_BY_IDX(inst, idx, period) 553 DT_INST_PWMS_CELL_BY_NAME(inst, name, period)
|
/Zephyr-Core-2.7.6/drivers/kscan/ |
D | Kconfig.ft5336 | 16 int "Sample period" 20 Sample period in milliseconds when in polling mode.
|