From e68b1f8c39fecbf2ed58ba00f6c2aebe1c23f424 Mon Sep 17 00:00:00 2001 From: Liyou Zhou Date: Tue, 17 Nov 2015 12:51:34 +0000 Subject: [PATCH] Move defines from cmake files into noridc files This requires changing of nordic source but do away with magic defines in parent modules note on #define asm __ASM all yotta mobule compile with -std=c99 which does not include "asm" keyword. --- source/extra_defines.cmake | 2 -- source/nordic_sdk/components/drivers_nrf/hal/nrf_delay.h | 2 ++ .../common/softdevice_handler/ble_stack_handler_types.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 source/extra_defines.cmake diff --git a/source/extra_defines.cmake b/source/extra_defines.cmake deleted file mode 100644 index f8c30c8..0000000 --- a/source/extra_defines.cmake +++ /dev/null @@ -1,2 +0,0 @@ -add_definitions(-DBLE_STACK_SUPPORT_REQD) -add_definitions(-Dasm=__ASM) diff --git a/source/nordic_sdk/components/drivers_nrf/hal/nrf_delay.h b/source/nordic_sdk/components/drivers_nrf/hal/nrf_delay.h index 762198a..91407d9 100644 --- a/source/nordic_sdk/components/drivers_nrf/hal/nrf_delay.h +++ b/source/nordic_sdk/components/drivers_nrf/hal/nrf_delay.h @@ -3,6 +3,8 @@ #include "nrf.h" +#define asm __ASM + /*lint --e{438, 522} "Variable not used" "Function lacks side-effects" */ #if defined ( __CC_ARM ) static __ASM void __INLINE nrf_delay_us(uint32_t volatile number_of_us) diff --git a/source/nordic_sdk/components/softdevice/common/softdevice_handler/ble_stack_handler_types.h b/source/nordic_sdk/components/softdevice/common/softdevice_handler/ble_stack_handler_types.h index ede5b12..ed310ef 100644 --- a/source/nordic_sdk/components/softdevice/common/softdevice_handler/ble_stack_handler_types.h +++ b/source/nordic_sdk/components/softdevice/common/softdevice_handler/ble_stack_handler_types.h @@ -22,6 +22,7 @@ #ifndef BLE_STACK_HANDLER_TYPES_H__ #define BLE_STACK_HANDLER_TYPES_H__ +#define BLE_STACK_SUPPORT_REQD #ifdef BLE_STACK_SUPPORT_REQD #include