Skip to content

Commit f36157f

Browse files
committed
Fixed Wire library instantiation on nRF52 targets
1 parent b332388 commit f36157f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=BitBang_I2C
2-
version=2.0.2
2+
version=2.0.3
33
author=Larry Bank <[email protected]>
44
maintainer=Larry Bank <[email protected]>
55
sentence=Bit-bang the I2C protocol on any 2 GPIO pins on any system.

src/BitBang_I2C.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ void I2CInit(BBI2C *pI2C, uint32_t iClock)
499499
if (pI2C->bWire) // use Wire library
500500
{
501501
#ifndef __AVR_ATtiny85__
502-
#ifdef __AVR__
502+
#if defined( __AVR__ ) || defined( NRF52 ) || defined ( ARDUINO_ARCH_NRF52840 )
503503
Wire.begin();
504504
#else
505505
if (pI2C->iSDA == 0xff || pI2C->iSCL == 0xff)

0 commit comments

Comments
 (0)