summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/stm32f4xx_it.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-21 16:48:16 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-21 16:48:16 +0100
commit7fdfa93700e0f5a5381a57bca3c45865c720dc2f (patch)
treec8516645bc8544d8c48720deb2113ae7944b8cf3 /stmhal/stm32f4xx_it.c
parente5f8a77db6b7328b9583cbd0fe6ac73535fca1a0 (diff)
downloadmicropython-7fdfa93700e0f5a5381a57bca3c45865c720dc2f.tar.gz
micropython-7fdfa93700e0f5a5381a57bca3c45865c720dc2f.zip
stmhal: Add Timer class: simple TIM control, incl callback on IRQ.
Simple but functional timer control. More sophistication will eventually be added, or for now just use direct register access :) Also added pyb.freq() function to get MCU clock frequencies.
Diffstat (limited to 'stmhal/stm32f4xx_it.c')
-rw-r--r--stmhal/stm32f4xx_it.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/stmhal/stm32f4xx_it.c b/stmhal/stm32f4xx_it.c
index 9b64f6165c..533412d0f0 100644
--- a/stmhal/stm32f4xx_it.c
+++ b/stmhal/stm32f4xx_it.c
@@ -355,12 +355,55 @@ void RTC_WKUP_IRQHandler(void) {
Handle_EXTI_Irq(EXTI_RTC_WAKEUP);
}
+void TIM1_BRK_TIM9_IRQHandler(void) {
+ timer_irq_handler(9);
+}
+
+void TIM1_UP_TIM10_IRQHandler(void) {
+ timer_irq_handler(1);
+ timer_irq_handler(10);
+}
+
+void TIM1_TRG_COM_TIM11_IRQHandler(void) {
+ timer_irq_handler(11);
+}
+
+void TIM2_IRQHandler(void) {
+ timer_irq_handler(2);
+}
+
void TIM3_IRQHandler(void) {
HAL_TIM_IRQHandler(&TIM3_Handle);
}
+void TIM4_IRQHandler(void) {
+ timer_irq_handler(4);
+}
+
void TIM5_IRQHandler(void) {
+ timer_irq_handler(5);
HAL_TIM_IRQHandler(&TIM5_Handle);
}
+void TIM6_DAC_IRQHandler(void) {
+ timer_irq_handler(6);
+}
+
+void TIM7_IRQHandler(void) {
+ timer_irq_handler(7);
+}
+
+void TIM8_BRK_TIM12_IRQHandler(void) {
+ timer_irq_handler(12);
+}
+
+void TIM8_UP_TIM13_IRQHandler(void) {
+ timer_irq_handler(8);
+ timer_irq_handler(13);
+}
+
+void TIM8_TRG_COM_TIM14_IRQHandler(void) {
+ timer_irq_handler(14);
+}
+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/