From 7fdfa93700e0f5a5381a57bca3c45865c720dc2f Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 21 Apr 2014 16:48:16 +0100 Subject: 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. --- stmhal/timer.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'stmhal/timer.h') diff --git a/stmhal/timer.h b/stmhal/timer.h index 06e19bcc8..de8e7374a 100644 --- a/stmhal/timer.h +++ b/stmhal/timer.h @@ -7,6 +7,11 @@ extern TIM_HandleTypeDef TIM3_Handle; extern TIM_HandleTypeDef TIM5_Handle; extern TIM_HandleTypeDef TIM6_Handle; +extern const mp_obj_type_t pyb_timer_type; + +void timer_init0(void); void timer_tim3_init(void); void timer_tim5_init(void); void timer_tim6_init(uint freq); + +void timer_irq_handler(uint tim_id); -- cgit v1.2.3