mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
extmod/machine_pwm: Factor out machine.PWM bindings to common code.
This commit refactors machine.PWM and creates extmod/machine_pwm.c. The esp8266, esp32 and rp2 ports all use this and provide implementations of the required PWM functionality. This helps to reduce code duplication and keep the same Python API across ports. This commit does not make any functional changes. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -158,6 +158,10 @@
|
||||
#define MICROPY_PY_MACHINE_PIN_MAKE_NEW mp_pin_make_new
|
||||
#define MICROPY_PY_MACHINE_BITSTREAM (1)
|
||||
#define MICROPY_PY_MACHINE_PULSE (1)
|
||||
#define MICROPY_PY_MACHINE_PWM (1)
|
||||
#define MICROPY_PY_MACHINE_PWM_INIT (1)
|
||||
#define MICROPY_PY_MACHINE_PWM_DUTY (1)
|
||||
#define MICROPY_PY_MACHINE_PWM_INCLUDEFILE "ports/esp32/machine_pwm.c"
|
||||
#define MICROPY_PY_MACHINE_I2C (1)
|
||||
#define MICROPY_PY_MACHINE_SOFTI2C (1)
|
||||
#define MICROPY_PY_MACHINE_SPI (1)
|
||||
|
||||
Reference in New Issue
Block a user