Small changes to work with more Blue Pills
This commit is contained in:
@@ -118,6 +118,10 @@ fn main() -> ! {
|
||||
let scl = gpiob.pb10.into_alternate_open_drain(&mut gpiob.crh);
|
||||
let sda = gpiob.pb11.into_alternate_open_drain(&mut gpiob.crh);
|
||||
|
||||
// Very brief delay before starting up i2c; otherwise the startup process
|
||||
// could hang.
|
||||
delay.delay_us(10_u8);
|
||||
|
||||
// Configure the I2C peripheral itself
|
||||
let i2c = BlockingI2c::i2c2(
|
||||
dev_periph.I2C2,
|
||||
@@ -166,9 +170,6 @@ fn main() -> ! {
|
||||
// Turn the LED on via the OutputPin trait
|
||||
led.on().unwrap();
|
||||
|
||||
// Very brief delay before the loop, just to show how
|
||||
delay.delay_us(10_u8);
|
||||
|
||||
let mut button_last = false;
|
||||
// Microcontroller programs never exit main, so we must loop!
|
||||
loop {
|
||||
|
Reference in New Issue
Block a user