Cast i2c frequency to uint32_t

This commit is contained in:
fvanroie 2021-11-13 22:29:07 +01:00
parent 0bb8d20f9e
commit 89ba830ce6
4 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ namespace dev {
void M5StackCore2::init(void) void M5StackCore2::init(void)
{ {
Wire.begin(TOUCH_SDA, TOUCH_SCL); Wire.begin(TOUCH_SDA, TOUCH_SCL, (uint32_t)I2C_TOUCH_FREQUENCY);
Axp.begin(); Axp.begin();
Axp.SetCHGCurrent(AXP192::kCHG_100mA); Axp.SetCHGCurrent(AXP192::kCHG_100mA);

View File

@ -94,7 +94,7 @@ void GT911_init()
{ {
// Wire.setClock(400000); // Wire.setClock(400000);
// Wire.begin(); // Wire.begin();
Wire.begin(TOUCH_SDA, TOUCH_SCL, I2C_TOUCH_FREQUENCY); Wire.begin(TOUCH_SDA, TOUCH_SCL, (uint32_t)I2C_TOUCH_FREQUENCY);
delay(300); delay(300);
touch.setHandler(GT911_setXY); touch.setHandler(GT911_setXY);

View File

@ -91,7 +91,7 @@ class TouchGt911 : public BaseTouch {
void init(int w, int h) void init(int w, int h)
{ {
Wire.begin(TOUCH_SDA, TOUCH_SCL, I2C_TOUCH_FREQUENCY); Wire.begin(TOUCH_SDA, TOUCH_SCL, (uint32_t)I2C_TOUCH_FREQUENCY);
// delay(300); // already happens in touch.begin() // delay(300); // already happens in touch.begin()
touch_scan(Wire); touch_scan(Wire);

View File

@ -58,7 +58,7 @@ class TouchLovyanGfx : public BaseTouch {
void init(int w, int h) void init(int w, int h)
{ {
Wire.begin(TOUCH_SDA, TOUCH_SCL, I2C_TOUCH_FREQUENCY); Wire.begin(TOUCH_SDA, TOUCH_SCL, (uint32_t)I2C_TOUCH_FREQUENCY);
// delay(300); // already happens in touch.begin() // delay(300); // already happens in touch.begin()
touch_scan(Wire); touch_scan(Wire);
} }