Switch the modify where C SDK does

This commit is contained in:
9names 2021-08-21 02:16:25 +10:00
parent 31b9aa85d1
commit 021221ede3

View file

@ -105,7 +105,7 @@ macro_rules! hal {
i2c.ic_enable.write(|w| w.enable().disabled()); i2c.ic_enable.write(|w| w.enable().disabled());
i2c.ic_con.write(|w| { i2c.ic_con.modify(|_,w| {
w.speed().fast(); w.speed().fast();
w.master_mode().enabled(); w.master_mode().enabled();
w.ic_slave_disable().slave_disabled(); w.ic_slave_disable().slave_disabled();
@ -162,7 +162,7 @@ macro_rules! hal {
.bits(if lcnt < 16 { 1 } else { (lcnt / 16) as u8 }) .bits(if lcnt < 16 { 1 } else { (lcnt / 16) as u8 })
}); });
i2c.ic_sda_hold i2c.ic_sda_hold
.write(|w| w.ic_sda_tx_hold().bits(sda_tx_hold_count as u16)); .modify(|_r,w| w.ic_sda_tx_hold().bits(sda_tx_hold_count as u16));
} }
i2c.ic_enable.write(|w| w.enable().enabled()); i2c.ic_enable.write(|w| w.enable().enabled());