diff options
| author | Damien George | 2018-05-14 13:53:46 +1000 |
|---|---|---|
| committer | Damien George | 2018-05-14 13:53:46 +1000 |
| commit | 88c26a48b4a3c8850ff2677b2f0ce8c90ba8e660 (patch) | |
| tree | 4dda9a0959eb87bd5b8b6c1a60dc5b4437bfc50d /ports/stm32/stm32_it.c | |
| parent | 92c5e2708d48a114f209a2299babb2c6de78ce22 (diff) | |
stm32/pyb_i2c: Put pyb.I2C under MICROPY_PY_PYB_LEGACY setting.
When disabled, the pyb.I2C class saves around 8k of code space and 172
bytes of RAM. The same functionality is now available in machine.I2C
(for F4 and F7 MCUs).
It is still enabled by default.
Diffstat (limited to 'ports/stm32/stm32_it.c')
| -rw-r--r-- | ports/stm32/stm32_it.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/stm32_it.c b/ports/stm32/stm32_it.c index db812958f..a77802bfa 100644 --- a/ports/stm32/stm32_it.c +++ b/ports/stm32/stm32_it.c @@ -776,6 +776,8 @@ void CAN2_SCE_IRQHandler(void) { } #endif +#if MICROPY_PY_PYB_LEGACY + #if defined(MICROPY_HW_I2C1_SCL) void I2C1_EV_IRQHandler(void) { IRQ_ENTER(I2C1_EV_IRQn); @@ -831,3 +833,5 @@ void I2C4_ER_IRQHandler(void) { IRQ_EXIT(I2C4_ER_IRQn); } #endif // defined(MICROPY_HW_I2C4_SCL) + +#endif // MICROPY_PY_PYB_LEGACY |
