refactored everything

This commit is contained in:
2021-06-10 19:09:33 +02:00
parent 0e79b5f4ae
commit 8f61c23e62
18 changed files with 740 additions and 265 deletions

View File

@ -10,6 +10,8 @@ extern "C" {
namespace spi {
void assignSpiUserArgs(spi::SpiBus spiBus, user_args_t userArgs);
/**
* 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.
@ -18,6 +20,8 @@ namespace spi {
*/
void assignSpiUserHandler(spi::SpiBus spiBus, user_handler_t user_handler,
user_args_t user_args);
void getSpiUserHandler(spi::SpiBus spiBus, user_handler_t* user_handler,
user_args_t* user_args);
/**
* Generic interrupt handlers supplied for convenience. Do not call these directly! Set them
@ -26,7 +30,7 @@ void assignSpiUserHandler(spi::SpiBus spiBus, user_handler_t user_handler,
*/
void dmaRxIrqHandler(void* dma_handle);
void dmaTxIrqHandler(void* dma_handle);
void spi1IrqHandler(void* spi_handle);
void spiIrqHandler(void* spi_handle);
}