From 3bf2ca05f1205bc1d2f9af56c8654226ec236cd0 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sat, 17 Dec 2016 01:14:50 +0100 Subject: [PATCH] nrf5/pwm: Adding pwm to modmachine.c --- nrf5/modmachine.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nrf5/modmachine.c b/nrf5/modmachine.c index a1b28cdd2d..5bcf241d1f 100644 --- a/nrf5/modmachine.c +++ b/nrf5/modmachine.c @@ -39,6 +39,7 @@ #include "gccollect.h" #include "pin.h" #include "spi.h" +#include "pwm.h" #define PYB_RESET_HARD (0) #define PYB_RESET_WDT (1) @@ -164,6 +165,10 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = { #if MICROPY_PY_MACHINE_SPI { MP_OBJ_NEW_QSTR(MP_QSTR_SPI), (mp_obj_t)&machine_hard_spi_type }, #endif + +#if MICROPY_PY_MACHINE_PWM + { MP_OBJ_NEW_QSTR(MP_QSTR_PWM), (mp_obj_t)&machine_hard_pwm_type }, +#endif { MP_OBJ_NEW_QSTR(MP_QSTR_HARD_RESET), MP_OBJ_NEW_SMALL_INT(PYB_RESET_HARD) }, { MP_OBJ_NEW_QSTR(MP_QSTR_WDT_RESET), MP_OBJ_NEW_SMALL_INT(PYB_RESET_WDT) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SOFT_RESET), MP_OBJ_NEW_SMALL_INT(PYB_RESET_SOFT) },