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...
uint32_t | i2c_presence_detector_get_presence_frame_rate_mhz (void)
| Get the actual frame rate for the current presence detector configuration. 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 191 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 186 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 296 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 260 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 284 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 272 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 318 of file i2c_presence_detector.c.

## ◆ i2c_presence_detector_get_presence_frame_rate_mhz()

uint32_t i2c_presence_detector_get_presence_frame_rate_mhz | ( | void |  | ) |

Get the actual frame rate for the current presence detector configuration.

Returns
  The frame rate in mHz

Definition at line 330 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 225 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 213 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 308 of file i2c_presence_detector.c.