mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-24 05:01:31 +11:00
Switch the modify where C SDK does
This commit is contained in:
parent
31b9aa85d1
commit
021221ede3
|
@ -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());
|
||||||
|
|
Loading…
Reference in a new issue