mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
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:
@@ -35,7 +35,7 @@
|
||||
#include "dma.h"
|
||||
#include "i2c.h"
|
||||
|
||||
#if MICROPY_HW_ENABLE_HW_I2C
|
||||
#if MICROPY_PY_PYB_LEGACY && MICROPY_HW_ENABLE_HW_I2C
|
||||
|
||||
/// \moduleref pyb
|
||||
/// \class I2C - a two-wire serial protocol
|
||||
@@ -1065,4 +1065,4 @@ const mp_obj_type_t pyb_i2c_type = {
|
||||
.locals_dict = (mp_obj_dict_t*)&pyb_i2c_locals_dict,
|
||||
};
|
||||
|
||||
#endif // MICROPY_HW_ENABLE_HW_I2C
|
||||
#endif // MICROPY_PY_PYB_LEGACY && MICROPY_HW_ENABLE_HW_I2C
|
||||
|
||||
Reference in New Issue
Block a user