40 lines
806 B
C
40 lines
806 B
C
#ifndef FSFW_HAL_STM32H7_DMA_INTERRUPTS_H_
|
|
#define FSFW_HAL_STM32H7_DMA_INTERRUPTS_H_
|
|
|
|
#include "interrupts.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum {
|
|
DMA_1 = 0,
|
|
DMA_2 = 1
|
|
} DMAIndexes;
|
|
|
|
typedef enum {
|
|
STREAM_0 = 0,
|
|
STREAM_1 = 1,
|
|
STREAM_2 = 2,
|
|
STREAM_3 = 3,
|
|
STREAM_4 = 4,
|
|
STREAM_5 = 5,
|
|
STREAM_6 = 6,
|
|
STREAM_7 = 7,
|
|
} DMAStreams;
|
|
|
|
/**
|
|
* Assign user interrupt handlers for DMA streams, allowing to pass an
|
|
* arbitrary argument as well. Generally, this argument will be the related DMA handle.
|
|
* @param user_handler
|
|
* @param user_args
|
|
*/
|
|
void assign_dma_user_handler(DMAIndexes dma_idx, DMAStreams stream_idx,
|
|
user_handler_t user_handler, user_args_t user_args);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* FSFW_HAL_STM32H7_DMA_INTERRUPTS_H_ */
|