Skip to content

Commit d994498

Browse files
IhorNehrutsadpgeorge
authored andcommitted
esp32/machine_i2c: Fix build warnings when I2C is disabled.
Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
1 parent 802a88c commit d994498

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ports/esp32/machine_i2c.c

100644100755
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include "driver/i2c.h"
3333
#include "hal/i2c_ll.h"
3434

35+
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SOFTI2C
36+
3537
#ifndef MICROPY_HW_I2C0_SCL
3638
#define MICROPY_HW_I2C0_SCL (GPIO_NUM_18)
3739
#define MICROPY_HW_I2C0_SDA (GPIO_NUM_19)
@@ -210,3 +212,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
210212
protocol, &machine_hw_i2c_p,
211213
locals_dict, &mp_machine_i2c_locals_dict
212214
);
215+
216+
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy