Skip to content

Commit 2526f33

Browse files
use term channel
1 parent 56b7ed6 commit 2526f33

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

MultiPlexer_TCA9548A/MultiPlexer_TCA9548A.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ void MultiPlexer_TCA9548A::begin(int sda_pin, int scl_pin) {
1515

1616
// set a base state which we know (also the default state on power on)
1717
_mux->closeAll();
18+
}
1819

19-
// tell the TCA9548A we want to use I2C bus number zero (to talk to the OLED)
20-
openChannel(0);
20+
void MultiPlexer_TCA9548A::openChannel(uint8_t channel_nr) {
21+
_mux->openChannel(channel_nr);
2122
}
2223

23-
void MultiPlexer_TCA9548A::openChannel(uint8_t bus_nr) {
24-
_mux->openChannel(bus_nr);
24+
void MultiPlexer_TCA9548A::closeChannel(uint8_t channel_nr) {
25+
_mux->closeChannel(channel_nr);
2526
}
27+

MultiPlexer_TCA9548A/MultiPlexer_TCA9548A.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class MultiPlexer_TCA9548A
1313
public:
1414
MultiPlexer_TCA9548A(int i2c_addr = 0x70);
1515
void begin(int sda_pin, int scl_pin);
16-
void openChannel(uint8_t bus_nr);
16+
void openChannel(uint8_t channel_nr);
17+
void closeChannel(uint8_t channel_nr);
1718

1819
private:
1920
TCA9548A* _mux;

0 commit comments

Comments
 (0)