diff options
| author | mark9064 <30447455+mark9064@users.noreply.github.com> | 2024-02-11 00:44:06 +0000 |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2024-05-01 16:13:47 +0200 |
| commit | 079e676baf70a943d31317afde47b759ca69ca2d (patch) | |
| tree | 9768d7347ba10ed2e05753e8752f0969967f7075 /src/drivers/SpiMaster.h | |
| parent | 6b5235c3013bf8ecbd1568669f48efce3508e8c0 (diff) | |
SPI transaction hooks
Diffstat (limited to 'src/drivers/SpiMaster.h')
| -rw-r--r-- | src/drivers/SpiMaster.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/SpiMaster.h b/src/drivers/SpiMaster.h index 8b698c57..9014061e 100644 --- a/src/drivers/SpiMaster.h +++ b/src/drivers/SpiMaster.h @@ -31,7 +31,7 @@ namespace Pinetime { SpiMaster& operator=(SpiMaster&&) = delete; bool Init(); - bool Write(uint8_t pinCsn, const uint8_t* data, size_t size); + bool Write(uint8_t pinCsn, const uint8_t* data, size_t size, void (*TransactionHook)(bool)); bool Read(uint8_t pinCsn, uint8_t* cmd, size_t cmdSize, uint8_t* data, size_t dataSize); bool WriteCmdAndBuffer(uint8_t pinCsn, const uint8_t* cmd, size_t cmdSize, const uint8_t* data, size_t dataSize); @@ -50,6 +50,7 @@ namespace Pinetime { NRF_SPIM_Type* spiBaseAddress; uint8_t pinCsn; + void (*TransactionHook)(bool); SpiMaster::SpiModule spi; SpiMaster::Parameters params; |
