Fix IRQ enum protections
This commit is contained in:
parent
b8910676db
commit
818b96ae61
@ -133,7 +133,7 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t* self, const mcu
|
||||
self->last_count = 0;
|
||||
self->last_overflow = 0;
|
||||
|
||||
if (HAL_TIM_Base_GetState(&tim_handle) == HAL_TIM_STATE_RESET) {
|
||||
if (HAL_TIM_Base_GetState(&tim_handle) == HAL_TIM_STATE_RESET) { //TODO: there's no state yet
|
||||
// Find a suitable timer
|
||||
TIM_TypeDef * tim_instance = stm_peripherals_find_timer();
|
||||
stm_peripherals_timer_reserve(tim_instance);
|
||||
|
@ -67,7 +67,11 @@ static size_t irq_map[] = {
|
||||
NULL_IRQ,
|
||||
#endif
|
||||
#ifdef TIM6
|
||||
TIM6_DAC_IRQn,
|
||||
#if !defined(DAC_BASE) || !defined(DAC1_BASE)
|
||||
TIM6_IRQn,
|
||||
#else
|
||||
TIM6_DAC_IRQn,
|
||||
#endif
|
||||
#else
|
||||
NULL_IRQ,
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user