Allow SPItransfer to be overridden by subclasses
This allows API clients to provide 'smarter' versions of Module that can do things like add thread safety so that multiple devices (and service threads) can share the same SPI bus. i.e. a subclass would lock some sort of mutex. This is used in the Radiolib Fork for Meshtastic to share an SPI bus with SD Card and TFT Display but we want to move back to upstream and not maintain our own fork.
This commit is contained in:
parent
34a0d77998
commit
08989ff6fa
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ class Module {
|
|||
|
||||
\param numBytes Number of bytes to transfer.
|
||||
*/
|
||||
void SPItransfer(uint8_t cmd, uint8_t reg, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes);
|
||||
virtual void SPItransfer(uint8_t cmd, uint8_t reg, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes);
|
||||
|
||||
// pin number access methods
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue