2021-06-29 21:19:20 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stm32wbxx_ll_tim.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** Timer ISR */
|
2021-08-08 18:03:25 +00:00
|
|
|
typedef void (*FuriHalInterruptISR)();
|
2021-06-29 21:19:20 +00:00
|
|
|
|
2021-07-15 13:54:11 +00:00
|
|
|
/** Initialize interrupt subsystem */
|
2021-08-08 18:03:25 +00:00
|
|
|
void furi_hal_interrupt_init();
|
2021-07-15 13:54:11 +00:00
|
|
|
|
|
|
|
/** Set DMA Channel ISR
|
|
|
|
* We don't clear interrupt flags for you, do it by your self.
|
|
|
|
* @param dma - DMA instance
|
|
|
|
* @param channel - DMA channel
|
|
|
|
* @param isr - your interrupt service routine or use NULL to clear
|
|
|
|
*/
|
2022-01-05 16:10:18 +00:00
|
|
|
void furi_hal_interrupt_set_dma_channel_isr(
|
|
|
|
DMA_TypeDef* dma,
|
|
|
|
uint32_t channel,
|
|
|
|
FuriHalInterruptISR isr);
|
2021-07-15 13:54:11 +00:00
|
|
|
|
2021-06-29 21:19:20 +00:00
|
|
|
/** Set Timer ISR
|
|
|
|
* By default ISR is serviced by ST HAL. Use this function to override it.
|
|
|
|
* We don't clear interrupt flags for you, do it by your self.
|
2021-07-15 13:54:11 +00:00
|
|
|
* @param timer - timer instance
|
|
|
|
* @param isr - your interrupt service routine or use NULL to clear
|
2021-06-29 21:19:20 +00:00
|
|
|
*/
|
2022-01-05 16:10:18 +00:00
|
|
|
void furi_hal_interrupt_set_timer_isr(TIM_TypeDef* timer, FuriHalInterruptISR isr);
|
2021-06-29 21:19:20 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|