Skip to content

Commit 132f11d

Browse files
committed
rename I2C terminology
1 parent 7993737 commit 132f11d

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

libraries/Wire/Wire_nRF52.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ TwoWire::TwoWire(NRF_TWIM_Type * p_twim, NRF_TWIS_Type * p_twis, IRQn_Type IRQn,
4646
}
4747

4848
void TwoWire::begin(void) {
49-
//Master Mode
49+
//Main Mode
5050
master = true;
5151

5252
*pincfg_reg(_uc_pinSCL) = ((uint32_t)GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos)
@@ -72,7 +72,7 @@ void TwoWire::begin(void) {
7272
}
7373

7474
void TwoWire::begin(uint8_t address) {
75-
//Slave mode
75+
//Secondary mode
7676
master = false;
7777

7878
*pincfg_reg(_uc_pinSCL) = ((uint32_t)GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos)

libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
void setup()
1616
{
17-
Wire.begin(); // join i2c bus (address optional for master)
17+
Wire.begin(); // join i2c bus (address optional for main)
1818
Serial.begin(9600); // start serial communication at 9600bps
1919
while ( !Serial ) delay(10); // for nrf52840 with native usb
2020
}
@@ -42,7 +42,7 @@ void loop()
4242
Wire.endTransmission(); // stop transmitting
4343

4444
// step 4: request reading from sensor
45-
Wire.requestFrom(112, 2); // request 2 bytes from slave device #112
45+
Wire.requestFrom(112, 2); // request 2 bytes from secondary device #112
4646

4747
// step 5: receive reading from sensor
4848
if(2 <= Wire.available()) // if two bytes were received

libraries/Wire/examples/digital_potentiometer/digital_potentiometer.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
void setup()
1818
{
19-
Wire.begin(); // join i2c bus (address optional for master)
19+
Wire.begin(); // join i2c bus (address optional for main)
2020
}
2121

2222
byte val = 0;

libraries/Wire/examples/master_reader/master_reader.ino renamed to libraries/Wire/examples/main_reader/main_reader.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Wire Master Reader
1+
// Wire Main Reader
22
// by Nicholas Zambetti <http://www.zambetti.com>
33

44
// Demonstrates use of the Wire library
5-
// Reads data from an I2C/TWI slave device
6-
// Refer to the "Wire Slave Sender" example for use with this
5+
// Reads data from an I2C/TWI secondary device
6+
// Refer to the "Wire Secondary Sender" example for use with this
77

88
// Created 29 March 2006
99

@@ -14,16 +14,16 @@
1414

1515
void setup()
1616
{
17-
Wire.begin(); // join i2c bus (address optional for master)
17+
Wire.begin(); // join i2c bus (address optional for main)
1818
Serial.begin(9600); // start serial for output
1919
while ( !Serial ) delay(10); // for nrf52840 with native usb
2020
}
2121

2222
void loop()
2323
{
24-
Wire.requestFrom(2, 6); // request 6 bytes from slave device #2
24+
Wire.requestFrom(2, 6); // request 6 bytes from secondary device #2
2525

26-
while(Wire.available()) // slave may send less than requested
26+
while(Wire.available()) // secondary may send less than requested
2727
{
2828
char c = Wire.read(); // receive a byte as character
2929
Serial.print(c); // print the character

libraries/Wire/examples/master_writer/master_writer.ino renamed to libraries/Wire/examples/main_writer/main_writer.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Wire Master Writer
1+
// Wire Main Writer
22
// by Nicholas Zambetti <http://www.zambetti.com>
33

44
// Demonstrates use of the Wire library
5-
// Writes data to an I2C/TWI slave device
6-
// Refer to the "Wire Slave Receiver" example for use with this
5+
// Writes data to an I2C/TWI secondary device
6+
// Refer to the "Wire Secondary Receiver" example for use with this
77

88
// Created 29 March 2006
99

@@ -14,7 +14,7 @@
1414

1515
void setup()
1616
{
17-
Wire.begin(); // join i2c bus (address optional for master)
17+
Wire.begin(); // join i2c bus (address optional for main)
1818
}
1919

2020
byte x = 0;

libraries/Wire/examples/slave_receiver/slave_receiver.ino renamed to libraries/Wire/examples/secondary_receiver/secondary_receiver.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Wire Slave Receiver
1+
// Wire Secondary Receiver
22
// by Nicholas Zambetti <http://www.zambetti.com>
33

44
// Demonstrates use of the Wire library
5-
// Receives data as an I2C/TWI slave device
6-
// Refer to the "Wire Master Writer" example for use with this
5+
// Receives data as an I2C/TWI secondary device
6+
// Refer to the "Wire Main Writer" example for use with this
77

88
// Created 29 March 2006
99

@@ -25,7 +25,7 @@ void loop()
2525
delay(100);
2626
}
2727

28-
// function that executes whenever data is received from master
28+
// function that executes whenever data is received from main
2929
// this function is registered as an event, see setup()
3030
void receiveEvent(int howMany)
3131
{

libraries/Wire/examples/slave_sender/slave_sender.ino renamed to libraries/Wire/examples/secondary_sender/secondary_sender.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Wire Slave Sender
1+
// Wire Secondary Sender
22
// by Nicholas Zambetti <http://www.zambetti.com>
33

44
// Demonstrates use of the Wire library
5-
// Sends data as an I2C/TWI slave device
6-
// Refer to the "Wire Master Reader" example for use with this
5+
// Sends data as an I2C/TWI secondary device
6+
// Refer to the "Wire Main Reader" example for use with this
77

88
// Created 29 March 2006
99

@@ -23,10 +23,10 @@ void loop()
2323
delay(100);
2424
}
2525

26-
// function that executes whenever data is requested by master
26+
// function that executes whenever data is requested by main
2727
// this function is registered as an event, see setup()
2828
void requestEvent()
2929
{
3030
Wire.write("hello "); // respond with message of 6 bytes
31-
// as expected by master
31+
// as expected by main
3232
}

0 commit comments

Comments
 (0)