File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 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) {
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 }
Original file line number Diff line number Diff 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 |
You can’t perform that action at this time.
0 commit comments