Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/i2c-bme680.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn main() -> ! {
let sda = gpiob.pb9.into_alternate_open_drain();
let scl = gpiob.pb8.into_alternate_open_drain();

let i2c = dp.I2C1.i2c(sda, scl, Config::new(100.kHz()), &mut rcc);
let i2c = dp.I2C1.i2c((sda, scl), Config::new(100.kHz()), &mut rcc);

let mut delayer = cp.SYST.delay(&rcc.clocks);
let timer2 = Timer::new(dp.TIM2, &rcc.clocks);
Expand Down
2 changes: 1 addition & 1 deletion examples/i2c-mpu6050.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn main() -> ! {
let sda = gpiob.pb9.into_alternate_open_drain();
let scl = gpiob.pb8.into_alternate_open_drain();

let i2c = dp.I2C1.i2c(sda, scl, 100.kHz(), &mut rcc);
let i2c = dp.I2C1.i2c((sda, scl), 100.kHz(), &mut rcc);

let mut mpu = Mpu6050::new(i2c);
let mut delay = cp.SYST.delay(&rcc.clocks);
Expand Down
2 changes: 1 addition & 1 deletion examples/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() -> ! {
let sda = gpiob.pb9.into_alternate_open_drain();
let scl = gpiob.pb8.into_alternate_open_drain();

let mut i2c = dp.I2C1.i2c(sda, scl, 40.kHz(), &mut rcc);
let mut i2c = dp.I2C1.i2c((sda, scl), 40.kHz(), &mut rcc);
// Alternatively, it is possible to specify the exact timing as follows (see the documentation
// of with_timing() for an explanation of the constant):
//let mut i2c = dp
Expand Down
Loading
Loading