Commit 85798d15 authored by John Maloney's avatar John Maloney Committed by Sandeep Mistry

Add support for secondary Wire1 interface

parent 4c9101dc
......@@ -108,4 +108,8 @@ class TwoWire : public Stream
extern TwoWire Wire;
#endif
#if WIRE_INTERFACES_COUNT > 1
extern TwoWire Wire1;
#endif
#endif
......@@ -309,4 +309,8 @@ void TwoWire::flush(void)
TwoWire Wire(NRF_TWI1, PIN_WIRE_SDA, PIN_WIRE_SCL);
#endif
#if WIRE_INTERFACES_COUNT > 1
TwoWire Wire1(NRF_TWI0, PIN_WIRE1_SDA, PIN_WIRE1_SCL);
#endif
#endif
......@@ -413,4 +413,17 @@ extern "C"
}
#endif
#if WIRE_INTERFACES_COUNT > 1
TwoWire Wire1(NRF_TWIM0, NRF_TWIS0, SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn, PIN_WIRE1_SDA, PIN_WIRE1_SCL);
extern "C"
{
void SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler(void)
{
Wire1.onService();
}
}
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment