File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822 Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change 19
19
#include "cmsis.h"
20
20
#include "PeripheralNames.h"
21
21
#include "nrf_delay.h"
22
+ #include "toolchain.h"
22
23
23
24
/*
24
25
* Note: The micro-second timer API on the nRF51 platform is implemented using
@@ -71,18 +72,9 @@ static uint32_t previous_tick_cc_value = 0;
71
72
To allow compilation of us_ticker programs without RTOS, those symbols are
72
73
exported from this module as weak ones.
73
74
*/
74
- #if defined (__CC_ARM ) /* ARMCC Compiler */
75
- __attribute__((weak )) uint32_t const os_trv ;
76
- __attribute__((weak )) uint32_t const os_clockrate ;
77
- __attribute__((weak )) void OS_Tick_Handler () { }
78
- #elif defined (__GNUC__ ) /* GNU Compiler */
79
- __attribute__((weak )) uint32_t const os_trv = 31 ;
80
- __attribute__((weak )) uint32_t const os_clockrate = 1000 ;
81
- __attribute__((noreturn , naked , weak )) void OS_Tick_Handler () { }
82
- #else
83
- #error Compiler not supported.
84
- #error Weak definitions of os_trv, os_clockrate and OS_Tick_Handler should be provided.
85
- #endif
75
+ MBED_WEAK uint32_t const os_trv ;
76
+ MBED_WEAK uint32_t const os_clockrate ;
77
+ MBED_WEAK void OS_Tick_Handler () { }
86
78
87
79
static inline void rtc1_enableCompareInterrupt (void )
88
80
{
You can’t perform that action at this time.
0 commit comments