We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b927b2 commit 53612beCopy full SHA for 53612be
STM32F1/libraries/Wire/Wire.cpp
@@ -60,7 +60,7 @@ uint8 TwoWire::process(){
60
}
61
62
// TODO: Add in Error Handling if devsel is out of range for other Maples
63
-TwoWire::TwoWire(uint8 dev_sel, uint8 flags) : isbegin(false) {
+TwoWire::TwoWire(uint8 dev_sel, uint8 flags) {
64
if (dev_sel == 1) {
65
sel_hard = I2C1;
66
} else if (dev_sel == 2) {
@@ -77,15 +77,12 @@ TwoWire::~TwoWire() {
77
78
79
void TwoWire::begin(uint8 self_addr) {
80
- if(isbegin) return;
81
- isbegin = true;
82
i2c_master_enable(sel_hard, dev_flags);
83
84
85
void TwoWire::end() {
86
i2c_disable(sel_hard);
87
sel_hard = 0;
88
- isbegin = false;
89
90
91
void TwoWire::setClock(uint32_t frequencyHz)
0 commit comments