Macros | Enumerations | Functions
ref_app_breathing_main.c File Reference
`#include <stdint.h>`
`#include <stdio.h>`
`#include "acc_definitions_a121.h"`
`#include "acc_definitions_common.h"`
`#include "acc_hal_definitions_a121.h"`
`#include "acc_hal_integration_a121.h"`
`#include "acc_integration.h"`
`#include "acc_processing.h"`
`#include "acc_rss_a121.h"`
`#include "acc_sensor.h"`
`#include "acc_version.h"`
`#include "ref_app_breathing.h"`

Go to the source code of this file.

## Macros
#define | SENSOR_ID (1U)
#define | SENSOR_TIMEOUT_MS (1000U)
#define | DEFAULT_PRESET_CONFIG BREATHING_PRESET_SITTING

## Enumerations
enum | breathing_preset_t { BREATHING_PRESET_NONE, BREATHING_PRESET_SITTING, BREATHING_PRESET_INFANT }

## Functions
static void | cleanup (ref_app_breathing_handle_t *handle, ref_app_breathing_config_t *config, acc_sensor_t *sensor, void *buffer)
static void | set_config (ref_app_breathing_config_t *config, breathing_preset_t preset)
static bool | sensor_calibration (acc_sensor_t *sensor, acc_cal_result_t *sensor_cal_result, void *buffer, uint32_t buffer_size)
static bool | measure (acc_sensor_t *sensor, void *buffer, uint32_t buffer_size)
static bool | enter_hibernate (acc_sensor_t *sensor)
static bool | exit_hibernate (acc_sensor_t *sensor)
static void | print_app_state (ref_app_breathing_result_t *result)
static void | print_result (ref_app_breathing_result_t *result, ref_app_breathing_app_state_t prev_app_state)
static bool | handle_indications (ref_app_breathing_handle_t *handle, ref_app_breathing_config_t *config, acc_sensor_t *sensor, acc_cal_result_t *sensor_cal_result, void *buffer, uint32_t buffer_size, acc_detector_presence_result_t *presence_result)
int | acconeer_main (int argc, char *argv[])
| Assembly test example. More...

## Macro Definition Documentation

## ◆ DEFAULT_PRESET_CONFIG

#define DEFAULT_PRESET_CONFIG BREATHING_PRESET_SITTING

Definition at line 32 of file ref_app_breathing_main.c.

## ◆ SENSOR_ID

#define SENSOR_ID (1U)

Definition at line 29 of file ref_app_breathing_main.c.

## ◆ SENSOR_TIMEOUT_MS

#define SENSOR_TIMEOUT_MS (1000U)

Definition at line 30 of file ref_app_breathing_main.c.

## Enumeration Type Documentation

## ◆ breathing_preset_t

enum breathing_preset_t

Enumerator
BREATHING_PRESET_NONE |
BREATHING_PRESET_SITTING |
BREATHING_PRESET_INFANT |

Definition at line 22 of file ref_app_breathing_main.c.

## Function Documentation

## ◆ acconeer_main()

int acconeer_main | ( | int | argc,
|  | char * | argv[]
| ) |  |

Assembly test example.

Touchless button application.

Tank level reference application.

Smart presence reference application.

Parking application.

Breathing example application.

Waste level application.

Vibration example.

Surface velocity example application.

Service subsweeps example.

Service multple configurations example.

Low power service example.

Service sensor calibration caching example.

Service example.

Processing subtract adaptive background example.

Processing static presence example.

Processing peak interpolation example.

Processing noncoherent mean example.

Processing coherent mean example.

Processing amplitude example.

hand motion application

Detector presence example with multiple configurations.

Low power detector presence example.

Detector presence example.

Detector distance example with iq data print.

Distance detector low power example.

Detector distance with calibration caching example.

Detector distance example.

Control helper example.

Cargo application.

Returns
  Returns EXIT_SUCCESS if successful, otherwise EXIT_FAILURE

Test if measure on wake up is enable Do a measurement if the the detector is ready (configured and calibrated)

Test if measure on wake up is enable Do a measurement if the the detector is ready (configured and calibrated)

Detector filters and states are reset on prepare (reconfiguration) to avoid risk of false detections when switching back to a zone.

Detector filters and states are reset on prepare (reconfiguration) to avoid risk of false detections when switching back to a zone.

Vibration example configuration

Definition at line 60 of file ref_app_breathing_main.c.

## ◆ cleanup()

static void cleanup | ( | ref_app_breathing_handle_t * | handle,
|  | ref_app_breathing_config_t * | config,
|  | acc_sensor_t * | sensor,
|  | void * | buffer
| ) |  |
| static

Definition at line 191 of file ref_app_breathing_main.c.

## ◆ enter_hibernate()

static bool enter_hibernate | ( | acc_sensor_t * | sensor | ) |
| static

Definition at line 313 of file ref_app_breathing_main.c.

## ◆ exit_hibernate()

static bool exit_hibernate | ( | acc_sensor_t * | sensor | ) |
| static

Definition at line 328 of file ref_app_breathing_main.c.

## ◆ handle_indications()

static bool handle_indications | ( | ref_app_breathing_handle_t * | handle,
|  | ref_app_breathing_config_t * | config,
|  | acc_sensor_t * | sensor,
|  | acc_cal_result_t * | sensor_cal_result,
|  | void * | buffer,
|  | uint32_t | buffer_size,
|  | acc_detector_presence_result_t * | presence_result
| ) |  |
| static

Definition at line 379 of file ref_app_breathing_main.c.

## ◆ measure()

static bool measure | ( | acc_sensor_t * | sensor,
|  | void * | buffer,
|  | uint32_t | buffer_size
| ) |  |
| static

Definition at line 275 of file ref_app_breathing_main.c.

## ◆ print_app_state()

static void print_app_state | ( | ref_app_breathing_result_t * | result | ) |
| static

Definition at line 343 of file ref_app_breathing_main.c.

## ◆ print_result()

static void print_result | ( | ref_app_breathing_result_t * | result,
|  | ref_app_breathing_app_state_t | prev_app_state
| ) |  |
| static

Definition at line 366 of file ref_app_breathing_main.c.

## ◆ sensor_calibration()

static bool sensor_calibration | ( | acc_sensor_t * | sensor,
|  | acc_cal_result_t * | sensor_cal_result,
|  | void * | buffer,
|  | uint32_t | buffer_size
| ) |  |
| static

Definition at line 236 of file ref_app_breathing_main.c.

## ◆ set_config()

static void set_config | ( | ref_app_breathing_config_t * | config,
|  | breathing_preset_t | preset
| ) |  |
| static

Definition at line 214 of file ref_app_breathing_main.c.