Browse Source

renesas-ra: Consolidate MICROPY_PY_MACHINE_I2C option.

MICROPY_HW_ENABLE_HW_I2C and MICROPY_PY_MACHINE_I2C are equivalent, so
just use the latter.

Signed-off-by: Damien George <damien@micropython.org>
pull/13045/head
Damien George 12 months ago
parent
commit
7b2f13fb69
  1. 4
      ports/renesas-ra/machine_i2c.c
  2. 4
      ports/renesas-ra/mpconfigboard_common.h
  3. 1
      ports/renesas-ra/mpconfigport.h

4
ports/renesas-ra/machine_i2c.c

@ -35,7 +35,7 @@
#include "ra_i2c.h"
#if MICROPY_HW_ENABLE_HW_I2C
#if MICROPY_PY_MACHINE_I2C
#define DEFAULT_I2C_FREQ (400000)
#define DEFAULT_I2C_TIMEOUT (1000)
@ -165,4 +165,4 @@ MP_DEFINE_CONST_OBJ_TYPE(
protocol, &machine_i2c_p
);
#endif // MICROPY_HW_ENABLE_HW_I2C
#endif // MICROPY_PY_MACHINE_I2C

4
ports/renesas-ra/mpconfigboard_common.h

@ -256,9 +256,9 @@
// Enable hardware I2C if there are any peripherals defined
#if defined(MICROPY_HW_I2C0_SCL) || defined(MICROPY_HW_I2C1_SCL) \
|| defined(MICROPY_HW_I2C2_SCL)
#define MICROPY_HW_ENABLE_HW_I2C (1)
#define MICROPY_PY_MACHINE_I2C (1)
#else
#define MICROPY_HW_ENABLE_HW_I2C (0)
#define MICROPY_PY_MACHINE_I2C (0)
#endif
#if defined(MICROPY_HW_PWM_0A) || defined(MICROPY_HW_PWM_0B) \

1
ports/renesas-ra/mpconfigport.h

@ -138,7 +138,6 @@
#endif
#define MICROPY_PY_MACHINE_PULSE (1)
#define MICROPY_PY_MACHINE_PIN_MAKE_NEW mp_pin_make_new
#define MICROPY_PY_MACHINE_I2C (1)
#define MICROPY_PY_MACHINE_SOFTI2C (1)
#define MICROPY_PY_MACHINE_SPI (1)
#define MICROPY_PY_MACHINE_SPI_MSB (SPI_FIRSTBIT_MSB)

Loading…
Cancel
Save