Skip to content

Commit bad12d2

Browse files
committed
I2C: rename data match status flag (statusI2CDataMatch) to prevent conflict with SPI (statusDataMatch)
1 parent 8f75d04 commit bad12d2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/machine/machine_mimxrt1062.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ func (jt *pinJumpTable) dispatchInterrupt(interrupt.Interrupt) {
341341
if status := gpio.ISR.Get() & gpio.IMR.Get(); status != 0 {
342342
gpio.ISR.Set(status) // clear interrupt
343343
for status != 0 {
344-
p := Pin(bits.TrailingZeros32(status))
345-
i := Pin(port + p)
346-
jt.lut[i](i)
347-
status &^= 1 << p
344+
off := Pin(bits.TrailingZeros32(status)) // ctz
345+
pin := Pin(port + off)
346+
jt.lut[pin](pin)
347+
status &^= 1 << off
348348
}
349349
}
350350
}

src/machine/machine_mimxrt1062_i2c.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const (
115115

116116
// all flags which are cleared by the driver upon starting a transfer
117117
statusClear statusFlag = statusEndOfPacket | statusStopDetect | statusNackDetect |
118-
statusArbitrationLost | statusFifoErr | statusPinLowTimeout | statusDataMatch
118+
statusArbitrationLost | statusFifoErr | statusPinLowTimeout | statusI2CDataMatch
119119

120120
// IRQ sources enabled by the non-blocking transactional API
121121
statusIrq statusFlag = statusArbitrationLost | statusTxReady | statusRxReady |

0 commit comments

Comments
 (0)