summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/timer.c')
-rw-r--r--stmhal/timer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/stmhal/timer.c b/stmhal/timer.c
index 68f295b748..3519c3c150 100644
--- a/stmhal/timer.c
+++ b/stmhal/timer.c
@@ -470,6 +470,11 @@ STATIC void config_deadtime(pyb_timer_obj_t *self, mp_int_t ticks) {
HAL_TIMEx_ConfigBreakDeadTime(&self->tim, &deadTimeConfig);
}
+TIM_HandleTypeDef *pyb_timer_get_handle(mp_obj_t timer) {
+ pyb_timer_obj_t *self = timer;
+ return &self->tim;
+}
+
STATIC void pyb_timer_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
pyb_timer_obj_t *self = self_in;