Skip to content

Commit 8f5e2eb

Browse files
agdlsandeepmistry
authored andcommitted
Changed boradcast variable to enableGeneralCall
1 parent 6a12954 commit 8f5e2eb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cores/arduino/SERCOM.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ void SERCOM::disableWIRE()
400400
}
401401
}
402402

403-
void SERCOM::initSlaveWIRE( uint8_t ucAddress, bool broadcast )
403+
void SERCOM::initSlaveWIRE( uint8_t ucAddress, bool enableGeneralCall )
404404
{
405405
// Initialize the peripheral clock and interruption
406406
initClockNVIC() ;
@@ -411,7 +411,7 @@ void SERCOM::initSlaveWIRE( uint8_t ucAddress, bool broadcast )
411411

412412
sercom->I2CS.ADDR.reg = SERCOM_I2CS_ADDR_ADDR( ucAddress & 0x7Ful ) | // 0x7F, select only 7 bits
413413
SERCOM_I2CS_ADDR_ADDRMASK( 0x00ul ); // 0x00, only match exact address
414-
if (broadcast) {
414+
if (enableGeneralCall) {
415415
sercom->I2CS.ADDR.reg |= SERCOM_I2CS_ADDR_GENCEN; // enable general call (address 0x00)
416416
}
417417

cores/arduino/SERCOM.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class SERCOM
184184
bool isReceiveCompleteSPI( void ) ;
185185

186186
/* ========== WIRE ========== */
187-
void initSlaveWIRE(uint8_t address, bool broadcast = false) ;
187+
void initSlaveWIRE(uint8_t address, bool enableGeneralCall = false) ;
188188
void initMasterWIRE(uint32_t baudrate) ;
189189

190190
void resetWIRE( void ) ;

libraries/Wire/Wire.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ void TwoWire::begin(void) {
4343
pinPeripheral(_uc_pinSCL, g_APinDescription[_uc_pinSCL].ulPinType);
4444
}
4545

46-
void TwoWire::begin(uint8_t address, bool broadcast) {
46+
void TwoWire::begin(uint8_t address, bool enableGeneralCall) {
4747
//Slave mode
48-
sercom->initSlaveWIRE(address, broadcast);
48+
sercom->initSlaveWIRE(address, enableGeneralCall);
4949
sercom->enableWIRE();
5050

5151
pinPeripheral(_uc_pinSDA, g_APinDescription[_uc_pinSDA].ulPinType);

libraries/Wire/Wire.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class TwoWire : public Stream
3434
public:
3535
TwoWire(SERCOM *s, uint8_t pinSDA, uint8_t pinSCL);
3636
void begin();
37-
void begin(uint8_t, bool broadcast = false);
37+
void begin(uint8_t, bool enableGeneralCall = false);
3838
void end();
3939
void setClock(uint32_t);
4040

0 commit comments

Comments
 (0)