Functions
i2c_presence_detector.h File Reference
`#include <stdbool.h>`
`#include <stdint.h>`
`#include "acc_detector_presence.h"`

Go to the source code of this file.

## Functions
acc_detector_presence_config_t * | i2c_presence_detector_get_config (void)
| Get presence detector configuration handle. More...
bool | i2c_presence_detector_command (uint32_t command)
| Send command to be executed to i2c presence detector. More...
uint32_t | i2c_presence_detector_get_status (void)
| Get presence detector status. More...
uint32_t | i2c_presence_detector_get_result (void)
| Get presence detector result. More...
float | i2c_presence_detector_get_distance (void)
| Get presence detector distance. More...
float | i2c_presence_detector_get_intra_presence_score (void)
| Get intra presence score. More...
float | i2c_presence_detector_get_inter_presence_score (void)
| Get inter presence score. More...
uint32_t | i2c_presence_detector_get_counter (void)
| Get presence detector measure counter. More...
void | i2c_presence_detector_presence_detected_gpio (bool enable)
| Enable/Disable gpio output for presence detected. More...
bool | i2c_presence_detector_get_presence_detected_gpio (void)
| Get gpio output for presence detected state. More...

## Function Documentation

## ◆ i2c_presence_detector_command()

bool i2c_presence_detector_command | ( | uint32_t | command | ) |

Send command to be executed to i2c presence detector.

Parameters

  [in] | command | The command to be executed

Returns
  true if successful

Definition at line 207 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_get_config()

acc_detector_presence_config_t* i2c_presence_detector_get_config | ( | void |  | ) |

Get presence detector configuration handle.

Returns
  presence detector configuration handle

Definition at line 201 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_get_counter()

uint32_t i2c_presence_detector_get_counter | ( | void |  | ) |

Get presence detector measure counter.

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

Returns
  measure counter from presence detector

Definition at line 318 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_get_distance()

float i2c_presence_detector_get_distance | ( | void |  | ) |

Get presence detector distance.

Returns
  The distance of the detected presence

Definition at line 279 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_get_inter_presence_score()

float i2c_presence_detector_get_inter_presence_score | ( | void |  | ) |

Get inter presence score.

Returns
  A measure of the amount of slow motion detected.

Definition at line 305 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_get_intra_presence_score()

float i2c_presence_detector_get_intra_presence_score | ( | void |  | ) |

Get intra presence score.

Returns
  A measure of the amount of fast motion detected.

Definition at line 292 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_get_presence_detected_gpio()

bool i2c_presence_detector_get_presence_detected_gpio | ( | void |  | ) |

Get gpio output for presence detected state.

Returns
  true if gpio output for presence detected is enabled

Definition at line 342 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_get_result()

uint32_t i2c_presence_detector_get_result | ( | void |  | ) |

Get presence detector result.

Returns
  result from presence detector

Definition at line 243 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_get_status()

uint32_t i2c_presence_detector_get_status | ( | void |  | ) |

Get presence detector status.

Returns
  status from presence detector

Definition at line 230 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_presence_detected_gpio()

void i2c_presence_detector_presence_detected_gpio | ( | bool | enable | ) |

Enable/Disable gpio output for presence detected.

Parameters

  [in] | enable | Enable gpio output for presence detected if set to true

Definition at line 331 of file i2c_presence_detector.c.