Skip to content

Commit a6115ae

Browse files
committed
fix(libraries/Wire): hide slave support elements
TwoWire::user_onRequest is used only in conjunction with slave support?
1 parent 011a2da commit a6115ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/Wire/src/Wire.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,17 @@ void TwoWire::flush()
616616

617617
void TwoWire::onReceive( void (*function)(int) )
618618
{
619+
#if SOC_I2C_SUPPORT_SLAVE
619620
user_onReceive = function;
621+
#endif
620622
}
621623

622624
// sets function called on slave read
623625
void TwoWire::onRequest( void (*function)(void) )
624626
{
627+
#if SOC_I2C_SUPPORT_SLAVE
625628
user_onRequest = function;
629+
#endif
626630
}
627631

628632
#if SOC_I2C_SUPPORT_SLAVE

0 commit comments

Comments
 (0)