mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-12-16 16:48:04 +00:00
Rework SPI interfaces
This commit is contained in:
@@ -23,6 +23,7 @@ namespace sta
|
||||
*/
|
||||
SpiDevice(SpiInterface * intf);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Start transmission with device.
|
||||
*
|
||||
@@ -36,12 +37,19 @@ namespace sta
|
||||
*/
|
||||
void endTransmission();
|
||||
|
||||
|
||||
/**
|
||||
* @brief Send single byte of data.
|
||||
*
|
||||
* @param value 8-bit value
|
||||
*/
|
||||
void transfer(uint8_t value);
|
||||
/**
|
||||
* @brief Send two bytes of data.
|
||||
*
|
||||
* @param value 16-bit value
|
||||
*/
|
||||
void transfer16(uint16_t data);
|
||||
/**
|
||||
* @brief Send data from buffer.
|
||||
*
|
||||
@@ -58,11 +66,13 @@ namespace sta
|
||||
*/
|
||||
void transfer(const uint8_t * txBuffer, uint8_t * rxBuffer, size_t size);
|
||||
/**
|
||||
* @brief Send two bytes of data.
|
||||
* @brief Read incoming data to buffer.
|
||||
*
|
||||
* @param value 16-bit value
|
||||
* @param buffer Destination buffer
|
||||
* @param size Number of bytes to read
|
||||
*/
|
||||
void transfer16(uint16_t data);
|
||||
void receive(uint8_t * buffer, size_t size);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Send byte value repeatedly.
|
||||
@@ -71,21 +81,6 @@ namespace sta
|
||||
* @param count Number of repetitions
|
||||
*/
|
||||
void fill(uint8_t value, size_t count);
|
||||
/**
|
||||
* @brief Send 32-bit value repeatedly.
|
||||
*
|
||||
* @param value 32-bit value to repeat
|
||||
* @param count Number of repetitions
|
||||
*/
|
||||
void fill32(uint32_t value, size_t count);
|
||||
|
||||
/**
|
||||
* @brief Read incoming data to buffer.
|
||||
*
|
||||
* @param buffer Destination buffer
|
||||
* @param size Number of bytes to read
|
||||
*/
|
||||
void receive(uint8_t * buffer, size_t size);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user