Skip to content

Commit 53612be

Browse files
authored
Revert the previous proposed changes
1 parent 9b927b2 commit 53612be

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

STM32F1/libraries/Wire/Wire.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ uint8 TwoWire::process(){
6060
}
6161

6262
// TODO: Add in Error Handling if devsel is out of range for other Maples
63-
TwoWire::TwoWire(uint8 dev_sel, uint8 flags) : isbegin(false) {
63+
TwoWire::TwoWire(uint8 dev_sel, uint8 flags) {
6464
if (dev_sel == 1) {
6565
sel_hard = I2C1;
6666
} else if (dev_sel == 2) {
@@ -77,15 +77,12 @@ TwoWire::~TwoWire() {
7777
}
7878

7979
void TwoWire::begin(uint8 self_addr) {
80-
if(isbegin) return;
81-
isbegin = true;
8280
i2c_master_enable(sel_hard, dev_flags);
8381
}
8482

8583
void TwoWire::end() {
8684
i2c_disable(sel_hard);
8785
sel_hard = 0;
88-
isbegin = false;
8986
}
9087

9188
void TwoWire::setClock(uint32_t frequencyHz)

0 commit comments

Comments
 (0)