From 10cbc83cf09c0d9d8be58487b3843eed4eb80f05 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Mon, 8 May 2017 21:10:18 +0200 Subject: [PATCH] nrf5/pwm: Updating config name of PWM to hardware PWM to prepare for introduction of soft variant. --- nrf5/boards/feather52/mpconfigboard.h | 2 +- nrf5/boards/pca10040/mpconfigboard.h | 2 +- nrf5/boards/pca10056/mpconfigboard.h | 2 +- nrf5/main.c | 4 ++-- nrf5/modules/machine/modmachine.c | 4 ++-- nrf5/modules/machine/pwm.c | 4 ++-- nrf5/mpconfigport.h | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nrf5/boards/feather52/mpconfigboard.h b/nrf5/boards/feather52/mpconfigboard.h index 3116078641..01fca8a08a 100644 --- a/nrf5/boards/feather52/mpconfigboard.h +++ b/nrf5/boards/feather52/mpconfigboard.h @@ -30,7 +30,7 @@ #define MICROPY_HW_MCU_NAME "NRF52832" #define MICROPY_PY_SYS_PLATFORM "nrf52" -#define MICROPY_PY_MACHINE_PWM (1) +#define MICROPY_PY_MACHINE_HW_PWM (1) #define MICROPY_PY_MACHINE_HW_SPI (1) #define MICROPY_PY_MACHINE_TIMER (1) #define MICROPY_PY_MACHINE_RTC (1) diff --git a/nrf5/boards/pca10040/mpconfigboard.h b/nrf5/boards/pca10040/mpconfigboard.h index 50b3da7fc3..57f686c057 100644 --- a/nrf5/boards/pca10040/mpconfigboard.h +++ b/nrf5/boards/pca10040/mpconfigboard.h @@ -30,7 +30,7 @@ #define MICROPY_HW_MCU_NAME "NRF52832" #define MICROPY_PY_SYS_PLATFORM "nrf52-DK" -#define MICROPY_PY_MACHINE_PWM (1) +#define MICROPY_PY_MACHINE_HW_PWM (1) #define MICROPY_PY_MACHINE_HW_SPI (1) #define MICROPY_PY_MACHINE_TIMER (1) #define MICROPY_PY_MACHINE_RTC (1) diff --git a/nrf5/boards/pca10056/mpconfigboard.h b/nrf5/boards/pca10056/mpconfigboard.h index f111e737d6..d5d685177a 100644 --- a/nrf5/boards/pca10056/mpconfigboard.h +++ b/nrf5/boards/pca10056/mpconfigboard.h @@ -30,7 +30,7 @@ #define MICROPY_HW_MCU_NAME "NRF52840" #define MICROPY_PY_SYS_PLATFORM "nrf52840-PDK" -#define MICROPY_PY_MACHINE_PWM (1) +#define MICROPY_PY_MACHINE_HW_PWM (1) #define MICROPY_PY_MACHINE_HW_SPI (1) #define MICROPY_PY_MACHINE_I2C (1) #define MICROPY_PY_MACHINE_ADC (1) diff --git a/nrf5/main.c b/nrf5/main.c index 348f77fcac..af384de492 100644 --- a/nrf5/main.c +++ b/nrf5/main.c @@ -48,7 +48,7 @@ #include "spi.h" #include "i2c.h" #include "rtc.h" -#if MICROPY_PY_MACHINE_PWM +#if MICROPY_PY_MACHINE_HW_PWM #include "pwm.h" #endif #include "timer.h" @@ -110,7 +110,7 @@ int main(int argc, char **argv) { i2c_init0(); #endif -#if MICROPY_PY_MACHINE_PWM +#if MICROPY_PY_MACHINE_HW_PWM pwm_init0(); #endif diff --git a/nrf5/modules/machine/modmachine.c b/nrf5/modules/machine/modmachine.c index 8f78a12606..5e24ca9cd1 100644 --- a/nrf5/modules/machine/modmachine.c +++ b/nrf5/modules/machine/modmachine.c @@ -41,7 +41,7 @@ #include "uart.h" #include "spi.h" #include "i2c.h" -#if MICROPY_PY_MACHINE_PWM +#if MICROPY_PY_MACHINE_HW_PWM #include "pwm.h" #endif #if MICROPY_PY_MACHINE_ADC @@ -213,7 +213,7 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = { #if MICROPY_PY_MACHINE_RTC { MP_OBJ_NEW_QSTR(MP_QSTR_RTC), (mp_obj_t)&machine_rtc_type }, #endif -#if MICROPY_PY_MACHINE_PWM +#if MICROPY_PY_MACHINE_HW_PWM { MP_OBJ_NEW_QSTR(MP_QSTR_PWM), (mp_obj_t)&machine_hard_pwm_type }, #endif #if MICROPY_PY_MACHINE_TEMP diff --git a/nrf5/modules/machine/pwm.c b/nrf5/modules/machine/pwm.c index 4b6f1a858d..6dfa9aa418 100644 --- a/nrf5/modules/machine/pwm.c +++ b/nrf5/modules/machine/pwm.c @@ -31,7 +31,7 @@ #include "py/runtime.h" #include "py/mphal.h" -#if MICROPY_PY_MACHINE_PWM +#if MICROPY_PY_MACHINE_HW_PWM #include "pin.h" #include "genhdr/pins.h" @@ -329,4 +329,4 @@ const mp_obj_type_t machine_hard_pwm_type = { .locals_dict = (mp_obj_t)&machine_pwm_locals_dict, }; -#endif // MICROPY_PY_MACHINE_PWM +#endif // MICROPY_PY_MACHINE_HW_PWM diff --git a/nrf5/mpconfigport.h b/nrf5/mpconfigport.h index 98e41ca972..939c0d61fc 100644 --- a/nrf5/mpconfigport.h +++ b/nrf5/mpconfigport.h @@ -127,8 +127,8 @@ #define MICROPY_PY_MACHINE_HW_SPI (1) #endif -#ifndef MICROPY_PY_MACHINE_PWM -#define MICROPY_PY_MACHINE_PWM (0) +#ifndef MICROPY_PY_MACHINE_HW_PWM +#define MICROPY_PY_MACHINE_HW_PWM (0) #endif #ifndef MICROPY_PY_MACHINE_TIMER