samd/modmachine: Make some machine classes configurable by #defines.

These include ADC, DAC, I2C, SoftI2C, SPI, SoftI2C, PWM, UART, pulse.  This
is useful for devices like the Adafruit Trinket series which have almost no
accessible GPIO pins.

Signed-off-by: robert-hh <robert@hammelrath.com>
This commit is contained in:
robert-hh
2023-03-11 08:03:18 +01:00
committed by Damien George
parent b2df094bf8
commit 47fa723586
12 changed files with 131 additions and 32 deletions

View File

@@ -26,6 +26,9 @@
*/
#include "py/runtime.h"
#if MICROPY_PY_MACHINE_I2C
#include "py/mphal.h"
#include "py/mperrno.h"
#include "extmod/machine_i2c.h"
@@ -274,3 +277,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
protocol, &machine_i2c_p,
locals_dict, &mp_machine_i2c_locals_dict
);
#endif