Functions
i2c_distance_detector.h File Reference
`#include <stdbool.h>`
`#include <stdint.h>`
`#include "acc_detector_distance.h"`

Go to the source code of this file.

## Functions
acc_detector_distance_config_t * | i2c_distance_detector_get_config (void)
| Get distance detector configuration handle. More...
bool | i2c_distance_detector_command (uint32_t command)
| Send command to be executed to i2c distance detector. More...
uint32_t | i2c_distance_detector_get_status (void)
| Get distance detector status. More...
uint32_t | i2c_distance_detector_get_result (void)
| Get distance detector result. More...
uint32_t | i2c_distance_detector_get_counter (void)
| Get distance detector measure counter. More...
float | i2c_distance_detector_get_peak_distance (uint16_t peak_id)
| Get the peak distance for a specific peak id. More...
float | i2c_distance_detector_get_peak_strength (uint16_t peak_id)
| Get the peak strength for a specific peak id. More...
void | i2c_distance_detector_measure_on_wakeup (bool enable)
| Enable/Disable measure on wake up. More...
bool | i2c_distance_detector_get_measure_on_wakeup (void)
| Get measure on wake up state. More...

## Function Documentation

## ◆ i2c_distance_detector_command()

bool i2c_distance_detector_command | ( | uint32_t | command | ) |

Send command to be executed to i2c distance detector.

Parameters

  [in] | command | The command to be executed

Returns
  true if successful

Definition at line 180 of file i2c_distance_detector.c.

## ◆ i2c_distance_detector_get_config()

acc_detector_distance_config_t* i2c_distance_detector_get_config | ( | void |  | ) |

Get distance detector configuration handle.

Returns
  distance detector configuration handle

Definition at line 174 of file i2c_distance_detector.c.

## ◆ i2c_distance_detector_get_counter()

uint32_t i2c_distance_detector_get_counter | ( | void |  | ) |

Get distance detector measure counter.

The counter will be increased every time the distance detector completes a measure

Returns
  measure counter from distance detector

Definition at line 251 of file i2c_distance_detector.c.

## ◆ i2c_distance_detector_get_measure_on_wakeup()

bool i2c_distance_detector_get_measure_on_wakeup | ( | void |  | ) |

Get measure on wake up state.

Returns
  true if measure on wake up is enabled

Definition at line 301 of file i2c_distance_detector.c.

## ◆ i2c_distance_detector_get_peak_distance()

float i2c_distance_detector_get_peak_distance | ( | uint16_t | peak_id | ) |

Get the peak distance for a specific peak id.

Parameters

  [in] | peak_id | The id of the peak

Returns
  The distance to the peak

Definition at line 264 of file i2c_distance_detector.c.

## ◆ i2c_distance_detector_get_peak_strength()

float i2c_distance_detector_get_peak_strength | ( | uint16_t | peak_id | ) |

Get the peak strength for a specific peak id.

Parameters

  [in] | peak_id | The id of the peak

Returns
  The strength of the peak

Definition at line 277 of file i2c_distance_detector.c.

## ◆ i2c_distance_detector_get_result()

uint32_t i2c_distance_detector_get_result | ( | void |  | ) |

Get distance detector result.

Returns
  result from distance detector

Definition at line 216 of file i2c_distance_detector.c.

## ◆ i2c_distance_detector_get_status()

uint32_t i2c_distance_detector_get_status | ( | void |  | ) |

Get distance detector status.

Returns
  status from distance detector

Definition at line 203 of file i2c_distance_detector.c.

## ◆ i2c_distance_detector_measure_on_wakeup()

void i2c_distance_detector_measure_on_wakeup | ( | bool | enable | ) |

Enable/Disable measure on wake up.

Parameters

  [in] | enable | Enable measure on wake up if set to true

Definition at line 290 of file i2c_distance_detector.c.