fsfw-hal/stm32h7/spi/interrupts.h

28 lines
586 B
C
Raw Normal View History

2021-06-03 16:11:49 +02:00
#ifndef FSFW_HAL_STM32H7_SPI_INTERRUPTS_H_
#define FSFW_HAL_STM32H7_SPI_INTERRUPTS_H_
2021-06-03 15:12:34 +02:00
2021-06-03 16:11:49 +02:00
#include "../interrupts.h"
2021-06-03 15:12:34 +02:00
2021-06-03 16:11:49 +02:00
#ifdef __cplusplus
extern "C" {
#endif
2021-06-03 15:12:34 +02:00
2021-06-03 16:11:49 +02:00
typedef enum {
SPI_1,
SPI_2
} SpiBus;
2021-06-03 15:12:34 +02:00
2021-06-03 16:11:49 +02:00
/**
* Assign a user interrupt handler for SPI bus 1, allowing to pass an arbitrary argument as well.
* Generally, this argument will be the related SPI handle.
* @param user_handler
* @param user_args
*/
void assign_spi_user_handler(SpiBus spiBus, user_handler_t user_handler, user_args_t user_args);
2021-06-03 15:12:34 +02:00
2021-06-03 16:11:49 +02:00
#ifdef __cplusplus
}
#endif
#endif /* FSFW_HAL_STM32H7_SPI_INTERRUPTS_H_ */