aboutsummaryrefslogtreecommitdiff
path: root/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-05-05 22:58:34 -0400
committerPaul Selkirk <paul@psgd.org>2017-09-07 18:11:00 -0400
commit358d038067b10330011ef4e6596ae37842d516fe (patch)
tree72b0ce416958536fff1070ba7c6a8926188cc93b /libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4
parent9ecd51ab1028e8033057df3117aac27f6f2cd406 (diff)
Port profiling code, using a new SysTick hook and new CLI commands.
Diffstat (limited to 'libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4')
-rw-r--r--libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_CRYPTECH_ALPHA/stm32f4xx_it.c7
1 files changed, 7 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 32b7707..b8b6fce 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