Function teensy4_bsp::board::lpi2c_baud

source ·
pub const fn lpi2c_baud(clock_speed: Lpi2cClockSpeed) -> Lpi2cBaud
Expand description

Computes a LPI2C baud rate, assuming ideal bus behavior.

If this produces timing configurations doesn’t closely approximate your expected baud rate, you may have more success by defining the LPI2C timing configurations yourself.

This function assumes that the LPI2C clock frequency matches LPI2C_FREQUENCY. Note that this can evaluate at compile time.

use teensy4_bsp as bsp;
use bsp::board;

const MY_BAUD: board::Lpi2cBaud = board::lpi2c_baud(board::Lpi2cClockSpeed::KHz400);