summaryrefslogtreecommitdiff
path: root/extmod/modmachine.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-11-24 11:35:31 +1100
committerDamien George <damien@micropython.org>2023-11-30 16:11:11 +1100
commite120c00c9590b5691a8a4560382ad70ffb7a1c5d (patch)
treeeb99b76cea4ccbad19a2dc1ab19453cc57160b7d /extmod/modmachine.c
parentb4d288ae4478886a0d547a176f090de678bff70e (diff)
stm32/modmachine: Only enable machine.I2C if hardware I2C is enabled.
Prior to this change, if a board did not define any hardware I2C pins, via MICROPY_HW_I2Cx_SCL, then machine.I2C would alias to machine.SoftI2C. That doesn't really make sense, and SoftI2C should always be used if there is no hardware implementation. So this commit makes it so that machine.I2C is only available if at least one set of I2C hardware pins are defined via the MICROPY_HW_I2Cx_SCL/SDA macros. For all boards that define at least one set of I2C hardware pins (which is most of them) this commit is a no-op. The only boards that change are: LEGO_HUB_NO6, LEGO_HUB_NO7, STM32H7B3I_DK. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/modmachine.c')
0 files changed, 0 insertions, 0 deletions