mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-09-29 13:17:33 +00:00
Added timeout to bus communication and added error handling via return values
This commit is contained in:
@@ -30,6 +30,7 @@ namespace sta
|
||||
SPIDevice(SPI * intf, GpioPin * csPin);
|
||||
|
||||
using Device::transfer;
|
||||
|
||||
/**
|
||||
* @brief Send and receive data simultaneously.
|
||||
*
|
||||
@@ -37,7 +38,7 @@ namespace sta
|
||||
* @param rxBuffer Receive buffer
|
||||
* @param size Number of bytes to transfer
|
||||
*/
|
||||
void transfer(const uint8_t * txBuffer, uint8_t * rxBuffer, size_t size);
|
||||
bool transfer(const uint8_t * txBuffer, uint8_t * rxBuffer, size_t size, uint32_t timeout = STA_MAX_TIMEOUT);
|
||||
|
||||
/**
|
||||
* @brief Get %SPI interface settings.
|
||||
|
Reference in New Issue
Block a user