mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-28 21:00:59 +00:00
i2c: i2c1_handler used I2C0 register block by mistake (#1487)
* i2c: i2c1_handler used I2C0 register block by mistake * update CHANGELOG
This commit is contained in:
parent
4d44f4179e
commit
5f79be6c9b
@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Fixed
|
||||
|
||||
- i2c: i2c1_handler used I2C0 register block by mistake (#1487)
|
||||
|
||||
### Changed
|
||||
|
||||
### Removed
|
||||
|
@ -705,14 +705,12 @@ mod asynch {
|
||||
|
||||
#[handler]
|
||||
pub(super) fn i2c0_handler() {
|
||||
unsafe { &*crate::peripherals::I2C0::PTR }
|
||||
.int_ena()
|
||||
let regs = unsafe { &*crate::peripherals::I2C0::PTR };
|
||||
regs.int_ena()
|
||||
.modify(|_, w| w.end_detect().clear_bit().trans_complete().clear_bit());
|
||||
|
||||
#[cfg(not(any(esp32, esp32s2)))]
|
||||
unsafe { &*crate::peripherals::I2C0::PTR }
|
||||
.int_ena()
|
||||
.modify(|_, w| w.txfifo_wm().clear_bit());
|
||||
regs.int_ena().modify(|_, w| w.txfifo_wm().clear_bit());
|
||||
|
||||
WAKERS[0].wake();
|
||||
}
|
||||
@ -720,14 +718,12 @@ mod asynch {
|
||||
#[cfg(i2c1)]
|
||||
#[handler]
|
||||
pub(super) fn i2c1_handler() {
|
||||
unsafe { &*crate::peripherals::I2C1::PTR }
|
||||
.int_ena()
|
||||
let regs = unsafe { &*crate::peripherals::I2C1::PTR };
|
||||
regs.int_ena()
|
||||
.modify(|_, w| w.end_detect().clear_bit().trans_complete().clear_bit());
|
||||
|
||||
#[cfg(not(any(esp32, esp32s2)))]
|
||||
unsafe { &*crate::peripherals::I2C0::PTR }
|
||||
.int_ena()
|
||||
.modify(|_, w| w.txfifo_wm().clear_bit());
|
||||
regs.int_ena().modify(|_, w| w.txfifo_wm().clear_bit());
|
||||
|
||||
WAKERS[1].wake();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user