HSPI::Data Struct Reference
Specifies a block incoming or outgoing data. More...
#include <Data.h>
Collaboration diagram for HSPI::Data:
Public Member Functions | |
Data () | |
void | clear () |
Reset to zero-length. More... | |
void | set (const void *data, uint16_t count) |
Set to reference external data block. More... | |
void * | get () |
Set internal data value of 1-4 bytes | |
| |
void | set8 (uint8_t data) |
Set to single 8-bit value. More... | |
void | set16 (uint16_t data) |
Set to single 16-bit value. More... | |
void | set32 (uint32_t data, uint8_t len=4) |
Set to 32-bit data. More... | |
Public Attributes | |
union { | |
uint8_t data8 | |
uint16_t data16 | |
uint32_t data32 | |
uint8_t data [4] | |
void * ptr | |
Pointer to data. More... | |
const void * cptr | |
uint8_t * ptr8 | |
}; | |
uint16_t | length: 15 |
Number of bytes of data. More... | |
uint16_t | isPointer: 1 |
If set, data is referenced indirectly, otherwise it's stored directly. More... | |
Detailed Description
Specifies a block incoming or outgoing data.
Data can be specified directly within Data
, or as a buffer reference.
Command or address are stored in native byte order and rearranged according to the requested byteOrder setting. Data is always sent and received LSB first (as stored in memory) so any re-ordering must be done by the device or application.
Constructor & Destructor Documentation
◆ Data()
|
inline |
Member Function Documentation
◆ clear()
|
inline |
Reset to zero-length.
◆ get()
|
inline |
◆ set()
|
inline |
Set to reference external data block.
- Parameters
-
data Location of data count Number of bytes
◆ set16()
|
inline |
Set to single 16-bit value.
- Parameters
-
data
◆ set32()
|
inline |
Set to 32-bit data.
- Parameters
-
data len Length in bytes (1 - 4)
◆ set8()
|
inline |
Set to single 8-bit value.
- Parameters
-
data
Member Data Documentation
◆
union { ... } |
◆ cptr
const void* HSPI::Data::cptr |
◆ data
uint8_t HSPI::Data::data[4] |
◆ data16
uint16_t HSPI::Data::data16 |
◆ data32
uint32_t HSPI::Data::data32 |
◆ data8
uint8_t HSPI::Data::data8 |
◆ isPointer
uint16_t HSPI::Data::isPointer |
If set, data is referenced indirectly, otherwise it's stored directly.
◆ length
uint16_t HSPI::Data::length |
Number of bytes of data.
◆ ptr
void* HSPI::Data::ptr |
Pointer to data.
◆ ptr8
uint8_t* HSPI::Data::ptr8 |
The documentation for this struct was generated from the following file: