/Zephyr-Core-3.6.0/drivers/watchdog/ |
D | wdt_mcux_wwdt.c | 71 #define MSEC_TO_WWDT_TICKS(clock_freq, msec) \ argument 72 ((uint32_t)((clock_freq / MSEC_PER_SEC) * msec) / 4) 78 uint32_t clock_freq; in mcux_wwdt_install_timeout() local 86 clock_freq = CLOCK_GetWdtClkFreq(0); in mcux_wwdt_install_timeout() 91 clock_freq = CLOCK_GetWdtClkFreq(); in mcux_wwdt_install_timeout() 96 data->wwdt_config.clockFreq_Hz = clock_freq; in mcux_wwdt_install_timeout() 99 MSEC_TO_WWDT_TICKS(clock_freq, cfg->window.max); in mcux_wwdt_install_timeout() 103 MSEC_TO_WWDT_TICKS(clock_freq, cfg->window.min); in mcux_wwdt_install_timeout()
|
D | wdt_mcux_wdog32.c | 78 #define MSEC_TO_WDOG32_TICKS(clock_freq, divider, msec) \ argument 79 ((uint32_t)(clock_freq * msec / 1000U / divider)) 86 uint32_t clock_freq; in mcux_wdog32_install_timeout() local 95 clock_freq = config->clock_frequency; in mcux_wdog32_install_timeout() 103 &clock_freq)) { in mcux_wdog32_install_timeout() 113 MSEC_TO_WDOG32_TICKS(clock_freq, div, cfg->window.max); in mcux_wdog32_install_timeout() 118 MSEC_TO_WDOG32_TICKS(clock_freq, div, cfg->window.min); in mcux_wdog32_install_timeout()
|
D | wdt_mcux_wdog.c | 75 uint32_t clock_freq; in mcux_wdog_install_timeout() local 88 &clock_freq)) { in mcux_wdog_install_timeout() 94 data->wdog_config.timeoutValue = clock_freq * cfg->window.max / 1000U; in mcux_wdog_install_timeout() 99 clock_freq * cfg->window.min / 1000U; in mcux_wdog_install_timeout()
|
D | wdt_wwdg_stm32.c | 136 uint32_t clock_freq = wwdg_stm32_get_pclk(dev); in wwdg_stm32_convert_timeout() local 147 wwdg_freq = ((float)clock_freq) / WWDG_INTERNAL_DIVIDER in wwdg_stm32_convert_timeout()
|
/Zephyr-Core-3.6.0/drivers/pwm/ |
D | pwm_intel_blinky.c | 28 uint32_t clock_freq; member 54 out_freq = cfg->clock_freq / (float) period_cycles; in bk_intel_set_cycles() 55 period = (out_freq * PWM_FREQ_MAX) / cfg->clock_freq; in bk_intel_set_cycles() 92 *cycles = cfg->clock_freq; in bk_intel_get_cycles_per_sec() 120 .clock_freq = DT_INST_PROP(n, clock_frequency), \
|
D | pwm_mcux_sctimer.c | 48 uint32_t clock_freq; in mcux_sctimer_new_channel() local 54 &clock_freq)) { in mcux_sctimer_new_channel() 58 pwm_freq = (clock_freq / config->prescale) / period_cycles; in mcux_sctimer_new_channel() 71 clock_freq, &data->event_number[channel]) == kStatus_Fail) { in mcux_sctimer_new_channel() 198 uint32_t clock_freq; in mcux_sctimer_pwm_get_cycles_per_sec() local 201 &clock_freq)) { in mcux_sctimer_pwm_get_cycles_per_sec() 205 *cycles = clock_freq / config->prescale; in mcux_sctimer_pwm_get_cycles_per_sec()
|
D | pwm_mcux_tpm.c | 39 uint32_t clock_freq; member 88 pwm_freq = (data->clock_freq >> config->prescale) / in mcux_tpm_set_cycles() 92 data->clock_freq); in mcux_tpm_set_cycles() 103 pwm_freq, data->clock_freq); in mcux_tpm_set_cycles() 126 *cycles = data->clock_freq >> config->prescale; in mcux_tpm_get_cycles_per_sec() 156 &data->clock_freq)) { in mcux_tpm_init()
|
D | pwm_rv32m1_tpm.c | 38 uint32_t clock_freq; member 87 pwm_freq = (data->clock_freq >> config->prescale) / in rv32m1_tpm_set_cycles() 91 data->clock_freq); in rv32m1_tpm_set_cycles() 102 pwm_freq, data->clock_freq); in rv32m1_tpm_set_cycles() 125 *cycles = data->clock_freq >> config->prescale; in rv32m1_tpm_get_cycles_per_sec() 155 &data->clock_freq)) { in rv32m1_tpm_init()
|
D | pwm_mcux.c | 74 uint32_t clock_freq; in mcux_pwm_set_cycles() local 80 &clock_freq)) { in mcux_pwm_set_cycles() 100 config->mode, 1U, clock_freq); in mcux_pwm_set_cycles() 165 uint32_t clock_freq; in mcux_pwm_get_cycles_per_sec() local 168 &clock_freq)) { in mcux_pwm_get_cycles_per_sec() 171 *cycles = clock_freq >> config->prescale; in mcux_pwm_get_cycles_per_sec()
|
D | pwm_numaker.c | 57 uint32_t clock_freq; member 130 data->cycles_per_sec = data->clock_freq / (cfg->prescale + 1U); in pwm_numaker_get_cycles_per_sec() 465 uint32_t clock_freq; in pwm_numaker_init() local 498 err = pwm_numaker_clk_get_rate(epwm, &clock_freq); in pwm_numaker_init() 504 data->clock_freq = clock_freq; in pwm_numaker_init() 505 data->cycles_per_sec = data->clock_freq / (cfg->prescale + 1U); in pwm_numaker_init()
|
D | pwm_mcux_pwt.c | 36 uint32_t clock_freq; member 275 *cycles = data->clock_freq >> config->prescale; in mcux_pwt_get_cycles_per_sec() 293 &data->clock_freq)) { in mcux_pwt_init()
|
/Zephyr-Core-3.6.0/drivers/mdio/ |
D | mdio_nxp_s32_gmac.c | 35 uint32_t clock_freq; member 48 Gmac_Ip_EnableMDIO(cfg->instance, cfg->suppress_preamble, data->clock_freq); in mdio_nxp_s32_read_c45() 68 Gmac_Ip_EnableMDIO(cfg->instance, cfg->suppress_preamble, data->clock_freq); in mdio_nxp_s32_write_c45() 88 Gmac_Ip_EnableMDIO(cfg->instance, cfg->suppress_preamble, data->clock_freq); in mdio_nxp_s32_read_c22() 108 Gmac_Ip_EnableMDIO(cfg->instance, cfg->suppress_preamble, data->clock_freq); in mdio_nxp_s32_write_c22() 129 if (clock_control_get_rate(cfg->clock_dev, cfg->clock_subsys, &data->clock_freq)) { in mdio_nxp_s32_init()
|
/Zephyr-Core-3.6.0/drivers/spi/ |
D | spi_rpi_pico_pio.c | 62 static float spi_pico_pio_clock_divisor(const uint32_t clock_freq, uint32_t spi_frequency) in spi_pico_pio_clock_divisor() argument 64 return (float)clock_freq / (float)(PIO_CYCLES * spi_frequency); in spi_pico_pio_clock_divisor() 67 static uint32_t spi_pico_pio_maximum_clock_frequency(const uint32_t clock_freq) in spi_pico_pio_maximum_clock_frequency() argument 69 return clock_freq / PIO_CYCLES; in spi_pico_pio_maximum_clock_frequency() 72 static uint32_t spi_pico_pio_minimum_clock_frequency(const uint32_t clock_freq) in spi_pico_pio_minimum_clock_frequency() argument 74 return clock_freq / (PIO_CYCLES * 65536); in spi_pico_pio_minimum_clock_frequency() 113 uint32_t clock_freq; in spi_pico_pio_configure() local 124 rc = clock_control_get_rate(dev_cfg->clk_dev, dev_cfg->clk_id, &clock_freq); in spi_pico_pio_configure() 160 if ((spi_cfg->frequency < spi_pico_pio_minimum_clock_frequency(clock_freq)) || in spi_pico_pio_configure() 161 (spi_cfg->frequency > spi_pico_pio_maximum_clock_frequency(clock_freq))) { in spi_pico_pio_configure() [all …]
|
D | spi_ambiq.c | 28 uint32_t clock_freq; member 108 if (cfg->clock_freq > AM_HAL_IOM_MAX_FREQ) { in spi_config() 113 data->iom_cfg.ui32ClockFreq = cfg->clock_freq; in spi_config() 258 .clock_freq = DT_INST_PROP(n, clock_frequency), \
|
D | spi_mchp_mss.c | 103 int clock_freq; member 258 if (spi_cfg->frequency > cfg->clock_freq) { in mss_spi_clk_gen_set() 259 speed = cfg->clock_freq / 2; in mss_spi_clk_gen_set() 263 clkrate = cfg->clock_freq / (2 * idx); in mss_spi_clk_gen_set() 468 .clock_freq = DT_INST_PROP(n, clock_frequency), \
|
D | spi_mchp_mss_qspi.c | 102 uint32_t clock_freq; member 351 if (spi_cfg->frequency > s->clock_freq) { in mss_qspi_clk_gen_set() 352 speed = s->clock_freq / 2; in mss_qspi_clk_gen_set() 356 clkrate = s->clock_freq / (2 * idx); in mss_qspi_clk_gen_set() 585 .clock_freq = DT_INST_PROP(n, clock_frequency), \
|
D | spi_rv32m1_lpspi.c | 140 uint32_t clock_freq; in spi_mcux_configure() local 194 &clock_freq)) { in spi_mcux_configure() 198 LPSPI_MasterInit(base, &master_config, clock_freq); in spi_mcux_configure()
|
/Zephyr-Core-3.6.0/drivers/i2c/ |
D | i2c_mcux_flexcomm.c | 56 uint32_t clock_freq; in mcux_flexcomm_configure() local 83 &clock_freq)) { in mcux_flexcomm_configure() 88 I2C_MasterSetBaudRate(base, baudrate, clock_freq); in mcux_flexcomm_configure() 260 uint32_t clock_freq; in mcux_flexcomm_target_register() local 267 &clock_freq)) { in mcux_flexcomm_target_register() 287 I2C_SlaveInit(base, &i2c_cfg, clock_freq); in mcux_flexcomm_target_register() 338 uint32_t clock_freq, bitrate_cfg; in mcux_flexcomm_init() local 357 &clock_freq)) { in mcux_flexcomm_init() 362 I2C_MasterInit(base, &master_config, clock_freq); in mcux_flexcomm_init()
|
D | i2c_mcux_lpi2c.c | 76 uint32_t clock_freq; in mcux_lpi2c_configure() local 103 &clock_freq)) { in mcux_lpi2c_configure() 112 LPI2C_MasterSetBaudRate(base, clock_freq, baudrate); in mcux_lpi2c_configure() 411 uint32_t clock_freq; in mcux_lpi2c_target_register() local 417 &clock_freq)) { in mcux_lpi2c_target_register() 440 LPI2C_SlaveInit(base, &slave_config, clock_freq); in mcux_lpi2c_target_register() 491 uint32_t clock_freq, bitrate_cfg; in mcux_lpi2c_init() local 513 &clock_freq)) { in mcux_lpi2c_init() 519 LPI2C_MasterInit(base, &master_config, clock_freq); in mcux_lpi2c_init()
|
D | i2c_mcux.c | 57 uint32_t clock_freq; in i2c_mcux_configure() local 82 clock_freq = CLOCK_GetFreq(config->clock_source); in i2c_mcux_configure() 84 I2C_MasterSetBaudRate(base, baudrate, clock_freq); in i2c_mcux_configure() 315 uint32_t clock_freq, bitrate_cfg; in i2c_mcux_init() local 322 clock_freq = CLOCK_GetFreq(config->clock_source); in i2c_mcux_init() 324 I2C_MasterInit(base, &master_config, clock_freq); in i2c_mcux_init()
|
/Zephyr-Core-3.6.0/drivers/clock_control/ |
D | clock_control_ambiq.c | 20 uint32_t clock_freq; member 95 *rate = cfg->clock_freq; in ambiq_clock_get_rate() 132 .clock_freq = DT_INST_PROP(n, clock_frequency), \
|
/Zephyr-Core-3.6.0/drivers/counter/ |
D | counter_mcux_gpt.c | 171 uint32_t clock_freq; in mcux_gpt_init() local 179 &clock_freq)) { in mcux_gpt_init() 184 if (clock_freq % config->info.freq) { in mcux_gpt_init() 186 LOG_ERR("clock src is %u\n", clock_freq); in mcux_gpt_init() 193 gptConfig.divider = clock_freq / config->info.freq; in mcux_gpt_init()
|
/Zephyr-Core-3.6.0/drivers/serial/ |
D | uart_mcux_lpsci.c | 242 uint32_t clock_freq; in mcux_lpsci_init() local 250 &clock_freq)) { in mcux_lpsci_init() 259 LPSCI_Init(config->base, &uart_config, clock_freq); in mcux_lpsci_init()
|
D | uart_rv32m1_lpuart.c | 245 uint32_t clock_freq; in rv32m1_lpuart_init() local 257 &clock_freq)) { in rv32m1_lpuart_init() 270 LPUART_Init(config->base, &uart_config, clock_freq); in rv32m1_lpuart_init()
|
D | uart_mcux_iuart.c | 229 uint32_t clock_freq; in mcux_iuart_init() local 237 &clock_freq)) { in mcux_iuart_init() 261 UART_Init(config->base, &uart_config, clock_freq); in mcux_iuart_init()
|