Welcome to mirror list, hosted at ThFree Co, Russian Federation.

furi_hal_interrupt.h « furi_hal « f6 « targets « firmware - github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b4cb603079fef561b10c3aee4a7abca4bb8387a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include <stm32wbxx_ll_tim.h>

#ifdef __cplusplus
extern "C" {
#endif

/** Timer ISR */
typedef void (*FuriHalInterruptISR)();

/** Initialize interrupt subsystem */
void furi_hal_interrupt_init();

/** 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
 */
void furi_hal_interrupt_set_dma_channel_isr(
    DMA_TypeDef* dma,
    uint32_t channel,
    FuriHalInterruptISR isr);

/** 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.
 * @param timer - timer instance
 * @param isr - your interrupt service routine or use NULL to clear
 */
void furi_hal_interrupt_set_timer_isr(TIM_TypeDef* timer, FuriHalInterruptISR isr);

#ifdef __cplusplus
}
#endif