Ilmsens HAL API
1.1.1
A cross-platform C-library for interfacing m:explore UWB-sensors
|
Typedefs | |
typedef uint32_t | ilmsens_hal_MemoryType |
Represents data type for register and memory access. | |
Functions | |
int | ilmsens_hal_readReg (unsigned int *pDevNums, unsigned int pNum, unsigned int pReg, ilmsens_hal_MemoryType *pVal, size_t pBufSizeBytes) |
Reads value from register at pReg address from all specified devices to buffer. More... | |
int | ilmsens_hal_writeReg (unsigned int *pDevNums, unsigned int pNum, unsigned int pReg, ilmsens_hal_MemoryType pVal) |
Writes pVal value to register at pReg address to all specified devices. More... | |
int | ilmsens_hal_readBlk (unsigned int *pDevNums, unsigned int pNum, unsigned int pAdr, unsigned int pNumEl, ilmsens_hal_MemoryType *pVal, size_t pBufSizeBytes) |
Reads pNumEl elements (32-bit words) starting at address pAdr from the internal memory of specified devices into a buffer pVal . More... | |
int | ilmsens_hal_writeBlk (unsigned int *pDevNums, unsigned int pNum, unsigned int pAdr, unsigned int pNumEl, ilmsens_hal_MemoryType *pVal, size_t pBufSizeBytes) |
Writes pNumEl elements (32-bit words) from buffer pVal to internal memory starting at address pAdr of specified devices. More... | |
int ilmsens_hal_readReg | ( | unsigned int * | pDevNums, |
unsigned int | pNum, | ||
unsigned int | pReg, | ||
ilmsens_hal_MemoryType * | pVal, | ||
size_t | pBufSizeBytes | ||
) |
Reads value from register at pReg
address from all specified devices to buffer.
The buffer pVal
must be large enough to hold one word for each device, i.e. it must be at least pNum
words in size.
pDevNums | pointer to a first element or an array of device-indexes |
pNum | number of array-elements |
pReg | register address |
pVal | pointer to buffer for register value(s) |
pBufSizeBytes | Size of buffer pointed to by pVal in bytes |
int ilmsens_hal_writeReg | ( | unsigned int * | pDevNums, |
unsigned int | pNum, | ||
unsigned int | pReg, | ||
ilmsens_hal_MemoryType | pVal | ||
) |
Writes pVal
value to register at pReg
address to all specified devices.
The same value is written to each device.
pDevNums | pointer to a first element or an array of device-indexes |
pNum | number of array-elements |
pReg | register address |
pVal | new register value |
int ilmsens_hal_readBlk | ( | unsigned int * | pDevNums, |
unsigned int | pNum, | ||
unsigned int | pAdr, | ||
unsigned int | pNumEl, | ||
ilmsens_hal_MemoryType * | pVal, | ||
size_t | pBufSizeBytes | ||
) |
Reads pNumEl
elements (32-bit words) starting at address pAdr
from the internal memory of specified devices into a buffer pVal
.
The buffer must be large enough to hold pNumEl
words for all specified devices, i.e. it provide space for at least pNumEl
x pNum
words.
pDevNums | pointer to a first element or an array of device-indexes |
pNum | number of array-elements |
pAdr | word-aligned start memory address |
pNumEl | number of words (elements) to read |
pVal | pointer to buffer for the transferred memory content |
pBufSizeBytes | Size of buffer pointed to by pVal in bytes |
int ilmsens_hal_writeBlk | ( | unsigned int * | pDevNums, |
unsigned int | pNum, | ||
unsigned int | pAdr, | ||
unsigned int | pNumEl, | ||
ilmsens_hal_MemoryType * | pVal, | ||
size_t | pBufSizeBytes | ||
) |
Writes pNumEl
elements (32-bit words) from buffer pVal
to internal memory starting at address pAdr
of specified devices.
The same content is written to each device, i.e. the buffer pVal
must hold pNumEl
words regardless of pNum
.
pDevNums | pointer to a first element or an array of device-indexes |
pNum | number of array-elements |
pAdr | word-aligned start memory address |
pNumEl | number of words (elements) to write |
pVal | pointer to buffer with data to write |
pBufSizeBytes | Size of buffer pointed to by pVal in bytes |