Skip to content

Commit

Permalink
stmhal: Remove obsolete code for special handling of TIM3 irq settings.
Browse files Browse the repository at this point in the history
TIM3 is no longer special, or at least does not have special IRQ settings.
  • Loading branch information
dpgeorge committed Aug 22, 2016
1 parent c6983e3 commit d2d9dfc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions stmhal/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ MP_DECLARE_CONST_FUN_OBJ(pyb_irq_stats_obj);
#define IRQ_PRI_OTG_HS 6
#define IRQ_SUBPRI_OTG_HS 0

#define IRQ_PRI_TIM3 6
#define IRQ_SUBPRI_TIM3 0

#define IRQ_PRI_TIM5 6
#define IRQ_SUBPRI_TIM5 0

Expand Down
2 changes: 1 addition & 1 deletion stmhal/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ STATIC mp_obj_t pyb_timer_init_helper(pyb_timer_obj_t *self, mp_uint_t n_args, c
}

// set IRQ priority (if not a special timer)
if (self->tim_id != 3 && self->tim_id != 5) {
if (self->tim_id != 5) {
HAL_NVIC_SetPriority(self->irqn, IRQ_PRI_TIMX, IRQ_SUBPRI_TIMX);
if (self->tim_id == 1) {
HAL_NVIC_SetPriority(TIM1_CC_IRQn, IRQ_PRI_TIMX, IRQ_SUBPRI_TIMX);
Expand Down

0 comments on commit d2d9dfc

Please sign in to comment.