Skip to content

Commit d4e47e2

Browse files
committed
Add user-facing wrapper of twi_isSollicited
1 parent af7d96d commit d4e47e2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

libraries/Wire/src/Wire.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,11 @@ void TwoWire::onRequest( void (*function)(void) )
372372
user_onRequest = function;
373373
}
374374

375+
bool TwoWire::isBusy(void)
376+
{
377+
return twi_isSollicited();
378+
}
379+
375380
// Preinstantiate Objects //////////////////////////////////////////////////////
376381

377382
TwoWire Wire = TwoWire();
378-

libraries/Wire/src/Wire.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class TwoWire : public Stream
7575
virtual void flush(void);
7676
void onReceive( void (*)(int) );
7777
void onRequest( void (*)(void) );
78+
bool isBusy(void);
7879

7980
inline size_t write(unsigned long n) { return write((uint8_t)n); }
8081
inline size_t write(long n) { return write((uint8_t)n); }

0 commit comments

Comments
 (0)