Home
last modified time | relevance | path

Searched refs:prescaler_divider (Results 1 – 1 of 1) sorted by relevance

/Zephyr-latest/drivers/spi/
Dspi_npcx_spip.c45 uint8_t prescaler_divider; in spi_npcx_spip_configure() local
129 prescaler_divider = data->src_clock_freq / 2 / spi_cfg->frequency; in spi_npcx_spip_configure()
130 if (prescaler_divider >= 1) { in spi_npcx_spip_configure()
131 prescaler_divider -= 1; in spi_npcx_spip_configure()
133 if (prescaler_divider >= SPI_NPCX_MAX_PRESCALER_DIV) { in spi_npcx_spip_configure()
134 LOG_ERR("SPI divider %d exceeds the max allowed value %d.", prescaler_divider, in spi_npcx_spip_configure()
138 SET_FIELD(reg_base->SPIP_CTL1, NPCX_SPIP_CTL1_SCDV, prescaler_divider); in spi_npcx_spip_configure()