From 0ee410d831c2662bd5cf78e6b95da32e9d5ef116 Mon Sep 17 00:00:00 2001 From: Jonathan Austin Date: Fri, 24 Jul 2015 16:08:45 +0100 Subject: [PATCH] Move HRM and DELTA targets to use LFCLK define After this change it will no longer be necessary to list all the platforms that require the LFCKL to be the internal RC oscillator, instead we specify it as a property of the platform. Applications and libraries can use the TARGET_NRF_LFCLK_RC symbol to filter for platforms that don't have an external crystal. Signed-off-by: Jonathan Austin --- workspace_tools/targets.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index 08266b75be..8b22539b6a 100755 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -1172,18 +1172,19 @@ class SEEED_TINY_BLE_OTA(MCU_NRF51_16K_OTA): class HRM1017(MCU_NRF51_16K): def __init__(self): MCU_NRF51_16K.__init__(self) + self.macros += ['TARGET_NRF_LFCLK_RC'] class HRM1017_BOOT(MCU_NRF51_16K_BOOT): def __init__(self): MCU_NRF51_16K_BOOT.__init__(self) self.extra_labels += ['HRM1017'] - self.macros += ['TARGET_HRM1017'] + self.macros += ['TARGET_HRM1017', 'TARGET_NRF_LFCLK_RC'] class HRM1017_OTA(MCU_NRF51_16K_OTA): def __init__(self): MCU_NRF51_16K_OTA.__init__(self) self.extra_labels += ['HRM1017'] - self.macros += ['TARGET_HRM1017'] + self.macros += ['TARGET_HRM1017', 'TARGET_NRF_LFCLK_RC'] class RBLAB_NRF51822(MCU_NRF51_16K): def __init__(self): @@ -1243,18 +1244,19 @@ class WALLBOT_BLE_OTA(MCU_NRF51_16K_OTA): class DELTA_DFCM_NNN40(MCU_NRF51_16K): def __init__(self): MCU_NRF51_16K.__init__(self) + self.macros += ['TARGET_NRF_LFCLK_RC'] class DELTA_DFCM_NNN40_BOOT(MCU_NRF51_16K_BOOT): def __init__(self): MCU_NRF51_16K_BOOT.__init__(self) self.extra_labels += ['DELTA_DFCM_NNN40'] - self.macros += ['TARGET_DELTA_DFCM_NNN40'] + self.macros += ['TARGET_DELTA_DFCM_NNN40', 'TARGET_NRF_LFCLK_RC'] class DELTA_DFCM_NNN40_OTA(MCU_NRF51_16K_OTA): def __init__(self): MCU_NRF51_16K_OTA.__init__(self) self.extra_labels += ['DELTA_DFCM_NNN40'] - self.macros += ['TARGET_DELTA_DFCM_NNN40'] + self.macros += ['TARGET_DELTA_DFCM_NNN40', 'TARGET_NRF_LFCLK_RC'] class NRF51_DK(MCU_NRF51_32K): def __init__(self):