From a41fce512ea8eb9692ef3374548db1ef4ffa8bb4 Mon Sep 17 00:00:00 2001 From: Jan Jongboom Date: Fri, 19 Apr 2019 12:27:47 +0900 Subject: [PATCH] Fix pinname generation on NRF52840_DK --- mbed-js/tools/generate_pins.py | 9 ++++++++- mbed-js/tools/nrf_gpio.h | 0 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 mbed-js/tools/nrf_gpio.h diff --git a/mbed-js/tools/generate_pins.py b/mbed-js/tools/generate_pins.py index 5f609cd..5ee01c7 100644 --- a/mbed-js/tools/generate_pins.py +++ b/mbed-js/tools/generate_pins.py @@ -121,7 +121,14 @@ def enumerate_pins(c_source_file, include_dirs, definitions): Enumerate pins specified in PinNames.h, by looking for a PinName enum typedef somewhere in the file. """ - definitions += ['__attribute(x)__=', '__extension__(x)=', 'register=', '__IO=', 'uint32_t=unsigned int'] + definitions += [ + '__attribute(x)__=', + '__extension__(x)=', + 'register=', + '__IO=', + 'uint32_t=unsigned int', + '_UINT32_T_DECLARED' + ] gcc_args = ['-E', '-fmerge-all-constants'] gcc_args += ['-I' + directory for directory in include_dirs] diff --git a/mbed-js/tools/nrf_gpio.h b/mbed-js/tools/nrf_gpio.h new file mode 100644 index 0000000..e69de29