Skip to content

Commit

Permalink
Fix Nrf52810 I2C compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
h2zero committed Jul 4, 2024
1 parent 9474331 commit 07abf98
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libraries/Wire/Wire_nRF52.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,26 @@ void TwoWire::onService(void)
}
}

#if defined(SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn)
TwoWire Wire(NRF_TWIM1, NRF_TWIS1, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL);
#elif defined(TWIM0_TWIS0_IRQn)
TwoWire Wire(NRF_TWIM0, NRF_TWIS0, TWIM0_TWIS0_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL);
#endif

#if WIRE_INTERFACES_COUNT > 0
extern "C"
{
#if defined(SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn)
void SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler(void)
{
Wire.onService();
}
#elif defined(TWIM0_TWIS0_IRQn)
void TWIM0_TWIS0_IRQHandler(void)
{
Wire.onService();
}
#endif
}
#endif

Expand Down

0 comments on commit 07abf98

Please sign in to comment.