TI BLE-Stack for Bluetooth API Documentation  3.03.02.00
Data Structures | Macros | Typedefs | Enumerations | Functions
TOF.h File Reference

Detailed Description

TOF interface.

Go to the source code of this file.

Data Structures

struct  ToF_BurstStat
 TOF Burst Stats Structure. More...
 
struct  ToF_Params
 TOF Parameters Structure. More...
 
struct  ToF_Status
 TOF Burst Stats Structure. More...
 
struct  ToF_Sync
 TOF Sync Structure. More...
 

Macros

#define FAILURE   0x01
 Failure.
 
#define IRQN_DOUBLE_SYNCWORD_BUFFER_SWITCH   11
 Same as RF_EventTxBufferChange, use with care.
 
#define IRQN_PARTIAL_READ_READY   15
 Partial result readout is ready.
 
#define RF_EventDoubleSyncWordBufferSwitch   (1 << IRQN_DOUBLE_SYNCWORD_BUFFER_SWITCH)
 Double syncword buffer switch event bitmap.
 
#define RF_EventPartialReadReady   (1 << IRQN_PARTIAL_READ_READY)
 Partial result readout event bitmap.
 
#define SUCCESS   0x00
 SUCCESS.
 
#define syncWordBufferOneReady   0x01
 First buffer ready.
 
#define syncWordBufferTwoReady   0x02
 Second buffer ready.
 
#define TICK_TO_METER   (6.25 * 3)
 Clock tics to distance in meters conversion.
 
#define TOF_COMPENSATION_CORRELATOR_COMP   2
 use correlator compensation
 
#define TOF_COMPENSATION_NO_COMP   0
 don't use compensation
 
#define TOF_COMPENSATION_STIM_COMP   1
 use STIM compensation (experimental feature)
 
#define TOF_FILL_1ST_BUFF   TOF_SEC_FILL_1ST_BUFF
 Fill first buffers.
 
#define TOF_FILL_2ND_BUFF   TOF_SEC_FILL_2ND_BUFF
 Fill second buffers.
 
#define TOF_FILL_BOTH_BUFF   TOF_SEC_FILL_BOTH_BUFFS
 Fill both buffers.
 
#define TOF_MAX_NUM_FREQ   20
 Maximun number of frequencies.
 
#define TOF_PATCH_LOCATION   0x21000914
 TOF patch location in memory.
 
#define TOF_SEEDLEN   32
 Seed Length in Bytes.
 
#define TOF_TIMEOUTVAL   0xFFFFFFFF
 TOF Timeout.
 

Typedefs

typedef void(* TOF_ApplicationCB) (void)
 Callback to a handler supplied by the application.
 
typedef uint8_t * ToF_RX_Buf
 Pointer to RX buffer.
 
typedef rfc_CMD_TOF_sample_extended_t ToF_Sample
 TOF Sample.
 
typedef rfc_CMD_TOF_synthCal_t ToF_SynthCal
 Pointer to frequency calibration struct, used for the pre-calibration of the synth.
 
typedef uint8_t * ToF_TX_Buf
 Pointer to TX buffer.
 

Enumerations

enum  ToF_Role { ToF_ROLE_SLAVE = 0, ToF_ROLE_MASTER, ToF_ROLE_PASSIVE }
 Enumeration for TOF roles of operation.
 
enum  TofHandshakeState_e {
  TOF_HANDSHAKE_STARTED = 0, TOF_HANDSHAKE_IN_PROGRESS, TOF_HANDSHAKE_RECOVERING, TOF_HANDSHAKE_COMPLETE,
  TOF_HANDSHAKE_FAILED
}
 TOF Handshake State.
 
enum  TofStatus_e { TOF_SUCCESS = 0, TOF_FAILED }
 TOF Errors.
 
enum  TofSyncState_e { TOF_SYNC_WAIT_FOR_SYNC = 0, TOF_SYNC_SYNCHRONIZED, TOF_SYNC_OUT_OF_SYNC }
 TOF Sync State.
 

Functions

void TOF_clearBuffers (ToF_Handle handle)
 Clean buffers for the specified ToF Handle. More...
 
void TOF_close (ToF_Handle handle)
 Close the ToF and RF drivers. More...
 
void TOF_getBurstStat (ToF_Handle handle, ToF_BurstStat **resultBuffer)
 Get the result for the last ToF burst (run) More...
 
uint8_t TOF_getSeed (uint8_t *dst)
 copy 32 byte seed into dst More...
 
ToF_Handle TOF_open (ToF_Struct *tofStruct, ToF_Params *params)
 Initiate RF ToF params and open RF driver. More...
 
void TOF_roleSwitch (ToF_Role newRole)
 Switch ToF role. More...
 
ToF_Status TOF_run (ToF_Handle handle, uint32_t nextTaskTime)
 Start a ToF run. More...
 
int TOF_setSeed (uint8_t *newSeed)
 call ToF Security module to restart the ctr drbg new 128-bit random seed More...
 
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale