Skip to content

Commit

Permalink
Merge pull request nkolban#640 from SolipsistD/i2c-tests
Browse files Browse the repository at this point in the history
Bug fix for cpp_utils/tests/task_i2c_scanner.cpp
  • Loading branch information
nkolban authored Sep 3, 2018
2 parents 297db2c + f8d3438 commit 2b7d590
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp_utils/tests/task_i2c_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "sdkconfig.h"

#define DEVICE_ADDRESS 0
#define SDA_PIN 25
#define SCL_PIN 26

Expand All @@ -14,7 +15,7 @@
class I2CScanner: public Task {
void run(void *data) override {
I2C i2c;
i2c.init((gpio_num_t)SDA_PIN, (gpio_num_t)SCL_PIN);
i2c.init((uint8_t)DEVICE_ADDRESS, (gpio_num_t)SDA_PIN, (gpio_num_t)SCL_PIN);
i2c.scan();
} // End run
};
Expand Down

0 comments on commit 2b7d590

Please sign in to comment.