From b350dc5198347e058339cb53a2aeaaedb0c96491 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sat, 17 Dec 2016 01:27:58 +0100 Subject: [PATCH] nrf52: Set names to be used on PWM0-2 in board config. For nrf52840, the PWM3 is excluded as repo does not have latest headers to reflect this yet. Bump up to be done soon. --- nrf5/boards/pca10040/mpconfigboard.h | 3 +++ nrf5/boards/pca10056/mpconfigboard.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/nrf5/boards/pca10040/mpconfigboard.h b/nrf5/boards/pca10040/mpconfigboard.h index 8dd0d43d0c..0b78f700a3 100644 --- a/nrf5/boards/pca10040/mpconfigboard.h +++ b/nrf5/boards/pca10040/mpconfigboard.h @@ -64,5 +64,8 @@ #define MICROPY_HW_SPI0_MISO (24) // A24 (Arduino D12) #define MICROPY_HW_SPI0_NSS (22) // A22 (Arduino D10) +#define MICROPY_HW_PWM0_NAME "PWM0" +#define MICROPY_HW_PWM1_NAME "PWM1" +#define MICROPY_HW_PWM2_NAME "PWM2" #define HELP_TEXT_BOARD_LED "1,2,3,4" diff --git a/nrf5/boards/pca10056/mpconfigboard.h b/nrf5/boards/pca10056/mpconfigboard.h index 35d02ad232..feee311ddf 100644 --- a/nrf5/boards/pca10056/mpconfigboard.h +++ b/nrf5/boards/pca10056/mpconfigboard.h @@ -59,4 +59,11 @@ #define MICROPY_HW_UART1_RTS (5) #define MICROPY_HW_UART1_HWFC (1) +#define MICROPY_HW_PWM0_NAME "PWM0" +#define MICROPY_HW_PWM1_NAME "PWM1" +#define MICROPY_HW_PWM2_NAME "PWM2" +#if 0 +#define MICROPY_HW_PWM3_NAME "PWM3" +#endif + #define HELP_TEXT_BOARD_LED "1,2,3,4"