Skip to content

Commit 980f0dc

Browse files
committed
Add condition for I2C NRF52805
1 parent 8dd6eca commit 980f0dc

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

libraries/Wire/Wire_nRF52.cpp

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -401,17 +401,34 @@ void TwoWire::onService(void)
401401
}
402402
}
403403

404-
TwoWire Wire(NRF_TWIM1, NRF_TWIS1, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL);
404+
#if defined(NRF52805_XXAA)
405405

406-
#if WIRE_INTERFACES_COUNT > 0
407-
extern "C"
408-
{
409-
void SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler(void)
406+
TwoWire Wire(NRF_TWIM0, NRF_TWIS0, TWIM0_TWIS0_TWI0_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL);
407+
408+
#if WIRE_INTERFACES_COUNT > 0
409+
extern "C"
410410
{
411-
Wire.onService();
411+
void TWIM0_TWIS0_TWI0_IRQn_IRQHandler(void)
412+
{
413+
Wire.onService();
414+
}
412415
}
413-
}
414-
#endif
416+
#endif
417+
418+
#else
419+
420+
TwoWire Wire(NRF_TWIM1, NRF_TWIS1, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL);
421+
422+
#if WIRE_INTERFACES_COUNT > 0
423+
extern "C"
424+
{
425+
void SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler(void)
426+
{
427+
Wire.onService();
428+
}
429+
}
430+
#endif
431+
#endif //defined(NRF52805_XXAA)
415432

416433
#if WIRE_INTERFACES_COUNT > 1
417434

0 commit comments

Comments
 (0)