Fixed compiler errors, untested due to lack of hardware

This commit is contained in:
dario
2024-11-14 21:58:42 +01:00
parent dadd179c26
commit 2da360fd1e
6 changed files with 36 additions and 47 deletions

View File

@@ -84,7 +84,7 @@ namespace sta
* @param value 8-bit value to repeat
* @param count Number of repetitions
*/
void fill(uint8_t value, size_t count, uint32_t timeout = STA_MAX_TIMEOUT);
bool fill(uint8_t value, size_t count, uint32_t timeout = STA_MAX_TIMEOUT);
protected:
/**

View File

@@ -51,7 +51,7 @@ namespace sta
* @param buffer The buffer of data to write to the address
* @param size The number of bytes to write to the peripheral.
*/
virtual bool writeMemory(uint8_t regAddr, const uint8_t * buffer, size_t size, uint32_t timeout = STA_MAX_TIMEOUT) = 0;
virtual bool writeMemory(uint8_t regAddr, const uint8_t * buffer, size_t size, uint32_t timeout = STA_MAX_TIMEOUT);
/**
* @brief Read incoming data to buffer.
@@ -68,7 +68,7 @@ namespace sta
* @param buffer The buffer of data to write the received data to.
* @param size The number of bytes to receive from the peripheral.
*/
virtual bool readMemory(uint8_t regAddr, uint8_t * buffer, size_t size, uint32_t timeout = STA_MAX_TIMEOUT) = 0;
virtual bool readMemory(uint8_t regAddr, uint8_t * buffer, size_t size, uint32_t timeout = STA_MAX_TIMEOUT);
/**
* @brief Send byte value repeatedly.

View File

@@ -40,24 +40,6 @@ namespace sta
*/
virtual bool transfer(const uint8_t * txBuffer, uint8_t * rxBuffer, size_t size, uint32_t timeout = STA_MAX_TIMEOUT) = 0;
/**
* @brief Write data to a specific memory address of the peripheral.
*
* @param regAddr The memory address.
* @param buffer The buffer of data to write to the address
* @param size The number of bytes to write to the peripheral.
*/
bool writeMemory(uint8_t regAddr, const uint8_t * buffer, size_t size, uint32_t timeout = STA_MAX_TIMEOUT) override;
/**
* @brief Read data from a specific memory address of the peripheral.
*
* @param regAddr The memory address.
* @param buffer The buffer of data to write the received data to.
* @param size The number of bytes to receive from the peripheral.
*/
bool readMemory(uint8_t regAddr, uint8_t * buffer, size_t size, uint32_t timeout = STA_MAX_TIMEOUT) override;
/**
* @brief Get %SPI interface settings.
*