furi_hal_interrupt.h 927 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include <stm32wbxx_ll_tim.h>
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /** Timer ISR */
  7. typedef void (*FuriHalInterruptISR)();
  8. /** Initialize interrupt subsystem */
  9. void furi_hal_interrupt_init();
  10. /** Set DMA Channel ISR
  11. * We don't clear interrupt flags for you, do it by your self.
  12. * @param dma - DMA instance
  13. * @param channel - DMA channel
  14. * @param isr - your interrupt service routine or use NULL to clear
  15. */
  16. void furi_hal_interrupt_set_dma_channel_isr(
  17. DMA_TypeDef* dma,
  18. uint32_t channel,
  19. FuriHalInterruptISR isr);
  20. /** Set Timer ISR
  21. * By default ISR is serviced by ST HAL. Use this function to override it.
  22. * We don't clear interrupt flags for you, do it by your self.
  23. * @param timer - timer instance
  24. * @param isr - your interrupt service routine or use NULL to clear
  25. */
  26. void furi_hal_interrupt_set_timer_isr(TIM_TypeDef* timer, FuriHalInterruptISR isr);
  27. #ifdef __cplusplus
  28. }
  29. #endif