2021-06-30 00:19:20 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stm32wbxx_ll_tim.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** Timer ISR */
|
2021-08-08 21:03:25 +03:00
|
|
|
typedef void (*FuriHalInterruptISR)();
|
2021-06-30 00:19:20 +03:00
|
|
|
|
2021-07-15 16:54:11 +03:00
|
|
|
/** Initialize interrupt subsystem */
|
2021-08-08 21:03:25 +03:00
|
|
|
void furi_hal_interrupt_init();
|
2021-07-15 16:54:11 +03: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 19:10:18 +03:00
|
|
|
void furi_hal_interrupt_set_dma_channel_isr(
|
|
|
|
DMA_TypeDef* dma,
|
|
|
|
uint32_t channel,
|
|
|
|
FuriHalInterruptISR isr);
|
2021-07-15 16:54:11 +03:00
|
|
|
|
2021-06-30 00:19:20 +03: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 16:54:11 +03:00
|
|
|
* @param timer - timer instance
|
|
|
|
* @param isr - your interrupt service routine or use NULL to clear
|
2021-06-30 00:19:20 +03:00
|
|
|
*/
|
2022-01-05 19:10:18 +03:00
|
|
|
void furi_hal_interrupt_set_timer_isr(TIM_TypeDef* timer, FuriHalInterruptISR isr);
|
2021-06-30 00:19:20 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|