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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user