/Zephyr-Core-3.7.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 87 clock_freq = CLOCK_GetWdtClkFreq(0); in mcux_wwdt_install_timeout() 89 clock_freq = CLOCK_GetWdtClkFreq(); in mcux_wwdt_install_timeout() 94 clock_freq = CLOCK_GetWdtClkFreq(); in mcux_wwdt_install_timeout() 99 data->wwdt_config.clockFreq_Hz = clock_freq; in mcux_wwdt_install_timeout() 102 MSEC_TO_WWDT_TICKS(clock_freq, cfg->window.max); in mcux_wwdt_install_timeout() 106 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()
|
/Zephyr-Core-3.7.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 | 58 uint32_t clock_freq; in mcux_pwm_set_cycles_internal() local 64 &clock_freq)) { in mcux_pwm_set_cycles_internal() 84 config->mode, 1U, clock_freq); in mcux_pwm_set_cycles_internal() 179 uint32_t clock_freq; in mcux_pwm_get_cycles_per_sec() local 182 &clock_freq)) { in mcux_pwm_get_cycles_per_sec() 185 *cycles = clock_freq >> config->prescale; in mcux_pwm_get_cycles_per_sec()
|
D | pwm_mcux_qtmr.c | 117 uint32_t clock_freq; in mcux_qtmr_pwm_get_cycles_per_sec() local 119 if (clock_control_get_rate(config->clock_dev, config->clock_subsys, &clock_freq)) { in mcux_qtmr_pwm_get_cycles_per_sec() 123 *cycles = clock_freq / config->prescaler; in mcux_qtmr_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.7.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.7.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.7.0/drivers/counter/ |
D | counter_mcux_gpt.c | 184 uint32_t clock_freq; in mcux_gpt_init() local 195 &clock_freq)) { in mcux_gpt_init() 200 if (clock_freq % config->info.freq) { in mcux_gpt_init() 202 LOG_ERR("clock src is %u\n", clock_freq); in mcux_gpt_init() 209 gptConfig.divider = clock_freq / config->info.freq; in mcux_gpt_init()
|
/Zephyr-Core-3.7.0/drivers/i2c/ |
D | i2c_mcux_flexcomm.c | 68 uint32_t clock_freq; in mcux_flexcomm_configure() local 95 &clock_freq)) { in mcux_flexcomm_configure() 100 I2C_MasterSetBaudRate(base, baudrate, clock_freq); in mcux_flexcomm_configure() 356 uint32_t clock_freq; in mcux_flexcomm_setup_slave_config() local 360 &clock_freq)) { in mcux_flexcomm_setup_slave_config() 364 I2C_SlaveInit(base, &data->i2c_cfg, clock_freq); in mcux_flexcomm_setup_slave_config() 471 uint32_t clock_freq, bitrate_cfg; in mcux_flexcomm_init() local 500 &clock_freq)) { in mcux_flexcomm_init() 505 I2C_MasterInit(base, &master_config, clock_freq); in mcux_flexcomm_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()
|
D | i2c_mcux_lpi2c.c | 82 uint32_t clock_freq; in mcux_lpi2c_configure() local 109 &clock_freq)) { in mcux_lpi2c_configure() 118 LPI2C_MasterSetBaudRate(base, clock_freq, baudrate); in mcux_lpi2c_configure() 417 uint32_t clock_freq; in mcux_lpi2c_target_register() local 423 &clock_freq)) { in mcux_lpi2c_target_register() 446 LPI2C_SlaveInit(base, &slave_config, clock_freq); in mcux_lpi2c_target_register() 500 uint32_t clock_freq, bitrate_cfg; in mcux_lpi2c_init() local 522 &clock_freq)) { in mcux_lpi2c_init() 528 LPI2C_MasterInit(base, &master_config, clock_freq); in mcux_lpi2c_init()
|
D | i2c_mcux_lpi2c_rtio.c | 84 uint32_t clock_freq; in mcux_lpi2c_do_configure() local 110 &clock_freq)) { in mcux_lpi2c_do_configure() 114 LPI2C_MasterSetBaudRate(base, clock_freq, baudrate); in mcux_lpi2c_do_configure() 289 uint32_t clock_freq, bitrate_cfg; in mcux_lpi2c_init() local 308 &clock_freq)) { in mcux_lpi2c_init() 314 LPI2C_MasterInit(base, &master_config, clock_freq); in mcux_lpi2c_init()
|
/Zephyr-Core-3.7.0/drivers/spi/ |
D | spi_rpi_pico_pio.c | 169 static float spi_pico_pio_clock_divisor(const uint32_t clock_freq, int cycles, in spi_pico_pio_clock_divisor() argument 172 return (float)clock_freq / (float)(cycles * spi_frequency); in spi_pico_pio_clock_divisor() 175 static uint32_t spi_pico_pio_maximum_clock_frequency(const uint32_t clock_freq, int cycles) in spi_pico_pio_maximum_clock_frequency() argument 177 return clock_freq / cycles; in spi_pico_pio_maximum_clock_frequency() 180 static uint32_t spi_pico_pio_minimum_clock_frequency(const uint32_t clock_freq, int cycles) in spi_pico_pio_minimum_clock_frequency() argument 182 return clock_freq / (cycles * 65536); in spi_pico_pio_minimum_clock_frequency() 252 uint32_t clock_freq; in spi_pico_pio_configure() local 260 rc = clock_control_get_rate(dev_cfg->clk_dev, dev_cfg->clk_id, &clock_freq); in spi_pico_pio_configure() 322 clock_freq, SPI_SIO_MODE_0_0_TX_CYCLES)) || in spi_pico_pio_configure() 324 clock_freq, SPI_SIO_MODE_0_0_TX_CYCLES))) { in spi_pico_pio_configure() [all …]
|
D | spi_ambiq.c | 28 uint32_t clock_freq; member 151 if (cfg->clock_freq > AM_HAL_IOM_MAX_FREQ) { in spi_config() 158 (config->frequency ? MIN(config->frequency, cfg->clock_freq) : cfg->clock_freq); in spi_config() 447 .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), \
|
/Zephyr-Core-3.7.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_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()
|
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()
|