diff options
author | Paul Selkirk <paul@psgd.org> | 2017-05-05 22:58:34 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2017-05-05 22:58:34 -0400 |
commit | 1815f1b2aa0a3ff0654f4eb65fdd0a5bdfe8c7b7 (patch) | |
tree | 34e28b0a0b2b1b862bb3039792a9504e227fd7ba /libraries/mbed/targets/cmsis | |
parent | 9cec66f9200cb573353928bd3292fb1f710e4b3c (diff) |
Port profiling code, using a new SysTick hook and new CLI commands.
Diffstat (limited to 'libraries/mbed/targets/cmsis')
-rw-r--r-- | libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_CRYPTECH_ALPHA/stm32f4xx_it.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_CRYPTECH_ALPHA/stm32f4xx_it.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_CRYPTECH_ALPHA/stm32f4xx_it.c index 8e5cc73..4629e44 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_CRYPTECH_ALPHA/stm32f4xx_it.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_CRYPTECH_ALPHA/stm32f4xx_it.c @@ -64,6 +64,13 @@ void HardFault_Handler(void) while (1) { ; } } +static void default_SysTick_hook(void) { }; +static void (*SysTick_hook)(void) = default_SysTick_hook; +void set_SysTick_hook(void (*hook)(void)) +{ + SysTick_hook = (hook == NULL) ? default_SysTick_hook : hook; +} + /** * @brief This function handles SysTick Handler. * @param None @@ -72,6 +79,7 @@ void HardFault_Handler(void) void SysTick_Handler(void) { HAL_IncTick(); + SysTick_hook(); } /******************************************************************************/ |