Skip to content

Commit

Permalink
esp32/machine_i2c: Fix build warnings when I2C is disabled.
Browse files Browse the repository at this point in the history
Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
  • Loading branch information
IhorNehrutsa authored and dpgeorge committed Feb 20, 2024
1 parent 802a88c commit d994498
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/esp32/machine_i2c.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include "driver/i2c.h"
#include "hal/i2c_ll.h"

#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SOFTI2C

#ifndef MICROPY_HW_I2C0_SCL
#define MICROPY_HW_I2C0_SCL (GPIO_NUM_18)
#define MICROPY_HW_I2C0_SDA (GPIO_NUM_19)
Expand Down Expand Up @@ -210,3 +212,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
protocol, &machine_hw_i2c_p,
locals_dict, &mp_machine_i2c_locals_dict
);

#endif

0 comments on commit d994498

Please sign in to comment.