/// Convenience for setting up the labelled SDA, SCL pins to
/// operate as an I2C master running at the specified frequency.
Convenience for setting up the labelled SDA, SCL pins to
operate as an I2C master running at the specified frequency.
Convenience for setting up the labelled SDA SCL pins to operate as an I2C master running at the specified frequency .
pub fn i2c_master(
    clocks: &mut GenericClockController,
    baud: impl Into<Hertz>,
    sercom: I2cSercom,
    pm: &mut pac::PM,
    sda: impl Into<Sda>,
    scl: impl Into<Scl>,
) -> I2c {
    let gclk0 = clocks.gclk0();
    let clock = &clocks.sercom3_core(&gclk0).unwrap();
    let freq = clock.freq();
    let baud = baud.into();
    let pads = i2c::Pads::new(sda.into(), scl.into());
    i2c::Config::new(pm, sercom, pads, freq).baud(baud).enable()
}
pub fn i2c_master ( clocks : & mut GenericClockController , baud : impl Into < Hertz > , sercom : I2cSercom , pm : & mut pac :: PM , sda : impl Into < Sda > , scl : impl Into < Scl > , ) -> I2c { let gclk0 = clocks . gclk0 ( ) ; let clock = & clocks . sercom3_core ( & gclk0 ) . unwrap ( ) ; let freq = clock . freq ( ) ; let baud = baud . into ( ) ; let pads = i2c :: Pads :: new ( sda . into ( ) , scl . into ( ) ) ; i2c :: Config :: new ( pm , sercom , pads , freq ) . baud ( baud ) . enable ( ) }
Convenience for setting up the labelled SDA, SCL pins to
operate as an I2C master running at the specified frequency.
Convenience for setting up the labelled SDA SCL pins to operate as an I2C master running at the specified frequency .
clocks
&mut GenericClockController
baud
impl Into<Hertz>
sercom
I2cSercom
pm
&mut pac::PM
sda
impl Into<Sda>
scl
impl Into<Scl>