Skip to content

Commit 5037615

Browse files
Seppo TakaloCruz Monrreal II
authored andcommitted
Fix AT24MAC driver builds on targets that device SDA/SCL names
Some targets have SDA and SCL defined in public headers, breaking the build of AT24MAC driver.
1 parent f81b728 commit 5037615

File tree

1 file changed

+7
-7
lines changed
  • components/802.15.4_RF/atmel-rf-driver/source

1 file changed

+7
-7
lines changed

components/802.15.4_RF/atmel-rf-driver/source/at24mac.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@
3131

3232
AT24Mac::I2CReset::I2CReset(PinName sda, PinName scl)
3333
{
34-
mbed::DigitalInOut SDA(sda, PIN_OUTPUT, PullUp, 1);
35-
mbed::DigitalInOut SCL(scl, PIN_OUTPUT, PullUp, 0);
34+
mbed::DigitalInOut pin_sda(sda, PIN_OUTPUT, PullUp, 1);
35+
mbed::DigitalInOut pin_scl(scl, PIN_OUTPUT, PullUp, 0);
3636
//generate 9 clocks for worst-case scenario
3737
for (int i = 0; i < 10; ++i) {
38-
SCL = 1;
38+
pin_scl = 1;
3939
wait_us(5);
40-
SCL = 0;
40+
pin_scl = 0;
4141
wait_us(5);
4242
}
4343
//generate a STOP condition
44-
SDA = 0;
44+
pin_sda = 0;
4545
wait_us(5);
46-
SCL = 1;
46+
pin_scl = 1;
4747
wait_us(5);
48-
SDA = 1;
48+
pin_sda = 1;
4949
wait_us(5);
5050
}
5151

0 commit comments

Comments
 (0)