fsfw-hal/stm32h7/dmaInterrupts.h

44 lines
806 B
C
Raw Normal View History

2021-06-05 13:29:43 +02:00
#ifndef FSFW_HAL_STM32H7_DMAINTERRUPTS_H_
#define FSFW_HAL_STM32H7_DMAINTERRUPTS_H_
2021-06-03 16:11:49 +02:00
#ifdef __cplusplus
extern "C" {
#endif
2021-06-04 16:34:38 +02:00
#include "interrupts.h"
2021-06-05 13:29:43 +02:00
namespace dma {
enum DMAIndexes {
2021-06-03 16:11:49 +02:00
DMA_1 = 0,
DMA_2 = 1
2021-06-05 13:29:43 +02:00
} ;
2021-06-03 16:11:49 +02:00
2021-06-05 13:29:43 +02:00
enum DMAStreams {
2021-06-03 16:11:49 +02:00
STREAM_0 = 0,
STREAM_1 = 1,
STREAM_2 = 2,
STREAM_3 = 3,
STREAM_4 = 4,
STREAM_5 = 5,
STREAM_6 = 6,
STREAM_7 = 7,
2021-06-05 13:29:43 +02:00
} ;
2021-06-03 16:11:49 +02:00
/**
* 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
*/
2021-06-05 13:29:43 +02:00
void assignDmaUserHandler(DMAIndexes dma_idx, DMAStreams stream_idx,
2021-06-03 16:11:49 +02:00
user_handler_t user_handler, user_args_t user_args);
2021-06-05 13:29:43 +02:00
}
2021-06-03 16:11:49 +02:00
#ifdef __cplusplus
}
#endif
2021-06-05 13:29:43 +02:00
#endif /* FSFW_HAL_STM32H7_DMAINTERRUPTS_H_ */