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:
Damien George
2021-06-24 12:37:50 +10:00
parent 9792c9105f
commit af64c2ddbd
19 changed files with 342 additions and 257 deletions

View File

@@ -4,7 +4,6 @@
#include "py/obj.h"
extern const mp_obj_type_t pyb_pin_type;
extern const mp_obj_type_t pyb_pwm_type;
extern const mp_obj_type_t machine_adc_type;
extern const mp_obj_type_t pyb_rtc_type;
extern const mp_obj_type_t pyb_uart_type;