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:
liebman 2024-04-22 07:41:59 -07:00 committed by GitHub
parent 4d44f4179e
commit 5f79be6c9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 10 deletions

View File

@ -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

View File

@ -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();
}