File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -341,10 +341,10 @@ func (jt *pinJumpTable) dispatchInterrupt(interrupt.Interrupt) {
341
341
if status := gpio .ISR .Get () & gpio .IMR .Get (); status != 0 {
342
342
gpio .ISR .Set (status ) // clear interrupt
343
343
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
348
348
}
349
349
}
350
350
}
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ const (
115
115
116
116
// all flags which are cleared by the driver upon starting a transfer
117
117
statusClear statusFlag = statusEndOfPacket | statusStopDetect | statusNackDetect |
118
- statusArbitrationLost | statusFifoErr | statusPinLowTimeout | statusDataMatch
118
+ statusArbitrationLost | statusFifoErr | statusPinLowTimeout | statusI2CDataMatch
119
119
120
120
// IRQ sources enabled by the non-blocking transactional API
121
121
statusIrq statusFlag = statusArbitrationLost | statusTxReady | statusRxReady |
You can’t perform that action at this time.
0 commit comments