Skip to content

Commit

Permalink
esp32/machine_i2c.c: Fix 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 committed Feb 19, 2024
1 parent 1ef2944 commit 516ca60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ports/esp32/machine_i2c.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SOFTI2C

#include "py/runtime.h"
#include "py/mphal.h"
Expand Down Expand Up @@ -210,3 +211,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
protocol, &machine_hw_i2c_p,
locals_dict, &mp_machine_i2c_locals_dict
);

#endif

0 comments on commit 516ca60

Please sign in to comment.