This module implements the Time of Flight (TOF)
More...
This module implements the Time of Flight (TOF)
§ TOF_clearBuffers()
void TOF_clearBuffers |
( |
ToF_Handle |
handle | ) |
|
Clean buffers for the specified ToF Handle.
- Parameters
-
- Returns
- none
§ TOF_close()
void TOF_close |
( |
ToF_Handle |
handle | ) |
|
Close the ToF and RF drivers.
- Parameters
-
- Returns
- none
§ TOF_getBurstStat()
void TOF_getBurstStat |
( |
ToF_Handle |
handle, |
|
|
ToF_BurstStat ** |
resultBuffer |
|
) |
| |
Get the result for the last ToF burst (run)
- Parameters
-
handle | - ToF Handle. |
resultBuffer | - The ToF stats for the last run. |
- Returns
- none
§ TOF_getSeed()
uint8_t TOF_getSeed |
( |
uint8_t * |
dst | ) |
|
copy 32 byte seed into dst
- Parameters
-
dst | - destination to copy seed into. |
- Returns
- None
§ TOF_open()
ToF_Handle TOF_open |
( |
ToF_Struct * |
tofStruct, |
|
|
ToF_Params * |
params |
|
) |
| |
Initiate RF ToF params and open RF driver.
- Parameters
-
tofStruct | - ToF structure initiated by user application |
params | - User provided params |
- Returns
- ToF Handle - Pointer to a ToF_Object
§ TOF_roleSwitch()
Switch ToF role.
- Parameters
-
newRole | - new role for this node to take |
- Returns
- None
§ TOF_run()
ToF_Status TOF_run |
( |
ToF_Handle |
handle, |
|
|
uint32_t |
nextTaskTime |
|
) |
| |
Start a ToF run.
- Parameters
-
handle | - ToF Handle. |
nextTaskTime | - Time remaining until next Stack event. |
- Returns
- ToF Status
§ TOF_setSeed()
int TOF_setSeed |
( |
uint8_t * |
newSeed | ) |
|
call ToF Security module to restart the ctr drbg new 128-bit random seed
Note: This function can be used only by RTLS Passive and RTLS Slave. It cannot be used by RTLS Master.
- Parameters
-
newSeed | - New seed handle. |
- Returns
- int - TOF_SEC_SUCCESS_E if succeeded, other if failed
§ TOFSecurity_close()
This function is used to close ToF Security and free buffers.
input parameters
- Parameters
-
tofSecHandle | - A pointer to an empty tof security handle. |
output parameters
- Returns
- int - NULL if failed, other if succeeded
§ TOFSecurity_genSyncWords()
int TOFSecurity_genSyncWords |
( |
tofSecHandle_t * |
tofSecHandle, |
|
|
uint8_t |
bufferToFill |
|
) |
| |
Will fill each Sync Word Buffer with numOfSyncWordsPerBuffer Sync Words.
input parameters
- Parameters
-
bufferToFill | - An enum describing which buffers to fill |
tofSecHandle | - A pointer to the tof security state. |
output parameters
- Parameters
-
tofSecHandle | - A pointer to the tof security state. |
- Returns
- NULL if failed, other if succeeded
§ TOFSecurity_open()
int TOFSecurity_open |
( |
tofSecHandle_t * |
tofSecHandle, |
|
|
uint8_t * |
seed |
|
) |
| |
This function is used to open AESCTRDRBG driver and, when needed, to generate 128-bit random seed.
input parameters
- Parameters
-
tofSecHandle | - A pointer to an empty tof security handle. |
seed | - NULL if need to generate seed, otherwise, a pointer to 128-bit random seed. |
output parameters
- Parameters
-
tofSecHandle | - A pointer to the tof security state. |
- Returns
- int - NULL if failed, other if succeeded.
§ TOFSecurity_paramsInit()
This function to initialize the tof security parameters.
input parameters
- Parameters
-
tofSecCfgPrms | - A pointer to the user-defined tof security preset values. |
tofSecHandle | - A pointer to an empty tof security handle. |
output parameters
- Parameters
-
tofSecHandle | - A pointer to the tof security state. |
- Returns
- int - NULL if failed, other if succeeded.