## Time of Flight Function Documentation

### Sys_TOF_Config

void Sys_TOF_Config(uint32_t cfg)

Configure TOF module.

Location: tof.h:53

Parameters

Direction | Name | Description
--- | --- | ---
in | cfg | Time of flight configuration; use [TOF_ERROR_INT_ENABLE | TOF_ERROR_INT_DISABLE], [TOF_OVERRUN_INT_ENABLE | TOF_OVERRUN_INT_DISABLE], [TOF_AVG_DATA_INT_ENABLE | TOF_AVG_DATA_INT_DISABLE], [TOF_DATA_INT_ENABLE | TOF_DATA_INT_DISABLE], [TOF_AVG_DATA_DMA_ENABLE | TOF_AVG_DATA_DMA_DISABLE], [TOF_DATA_DMA_ENABLE | TOF_DATA_DMA_DISABLE], TOF_AVG_DATA_*, TOF_STOP_SRC_*, TOF_START_SRC_*, TOF_CLK_PRESCALE_*

Example Code for Sys_TOF_Config
// Configure time-of-flight module: // - Enable the error, overrun and average data complete interrupts // - Average data interrupt is triggered after 16 samples Sys_TOF_Config(TOF_ERROR_INT_ENABLE | TOF_OVERRUN_INT_ENABLE | TOF_AVG_DATA_INT_ENABLE | TOF_DATA_INT_ENABLE | TOF_AVG_DATA_16);

### Sys_TOF_Start

void Sys_TOF_Start()

Start the time of flight module.

Location: tof.h:63

Example Code for Sys_TOF_Start
// Start the time-of-flight counter. Sys_TOF_Start();

### Sys_TOF_Stop

void Sys_TOF_Stop()

Stop the time of flight module.

Location: tof.h:73

Example Code for Sys_TOF_Stop
// Stop the time-of-flight counter. Sys_TOF_Stop();