added msp init functions
This commit is contained in:
@ -8,26 +8,40 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*msp_func_t) (void* args);
|
||||
|
||||
/**
|
||||
* Assign MSP init functions. Important for SPI configuration
|
||||
* @param init_func
|
||||
* @param init_args
|
||||
* @param deinit_func
|
||||
* @param deinit_args
|
||||
*/
|
||||
void set_spi_msp_functions(msp_func_t init_func, void* init_args, msp_func_t deinit_func,
|
||||
void* deinit_args);
|
||||
|
||||
/**
|
||||
* Assign DMA handles. Required to use DMA for SPI transfers.
|
||||
* @param txHandle
|
||||
* @param rxHandle
|
||||
*/
|
||||
void setDmaHandles(DMA_HandleTypeDef* txHandle, DMA_HandleTypeDef* rxHandle);
|
||||
void set_dma_handles(DMA_HandleTypeDef* txHandle, DMA_HandleTypeDef* rxHandle);
|
||||
|
||||
void getDmaHandles(DMA_HandleTypeDef** txHandle, DMA_HandleTypeDef** rxHandle);
|
||||
void get_dma_handles(DMA_HandleTypeDef** txHandle, DMA_HandleTypeDef** rxHandle);
|
||||
void get_msp_init_function(msp_func_t* init_func, void **args);
|
||||
void get_msp_deinit_function(msp_func_t* deinit_func, void **args);
|
||||
|
||||
/**
|
||||
* Assign SPI handle. Needs to be done before using the SPI
|
||||
* @param spiHandle
|
||||
*/
|
||||
void assignSpiHandle(SPI_HandleTypeDef *spiHandle);
|
||||
void assign_spi_handle(SPI_HandleTypeDef *spiHandle);
|
||||
|
||||
/**
|
||||
* Get the assigned SPI handle.
|
||||
* @return
|
||||
*/
|
||||
SPI_HandleTypeDef* getSpiHandle();
|
||||
SPI_HandleTypeDef* get_spi_handle();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user