af64c2ddbd
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>
19 lines
578 B
C
19 lines
578 B
C
#ifndef MICROPY_INCLUDED_RP2_MODMACHINE_H
|
|
#define MICROPY_INCLUDED_RP2_MODMACHINE_H
|
|
|
|
#include "py/obj.h"
|
|
|
|
extern const mp_obj_type_t machine_adc_type;
|
|
extern const mp_obj_type_t machine_hw_i2c_type;
|
|
extern const mp_obj_type_t machine_pin_type;
|
|
extern const mp_obj_type_t machine_rtc_type;
|
|
extern const mp_obj_type_t machine_spi_type;
|
|
extern const mp_obj_type_t machine_timer_type;
|
|
extern const mp_obj_type_t machine_uart_type;
|
|
extern const mp_obj_type_t machine_wdt_type;
|
|
|
|
void machine_pin_init(void);
|
|
void machine_pin_deinit(void);
|
|
|
|
#endif // MICROPY_INCLUDED_RP2_MODMACHINE_H
|