Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
airspeed_adc.c File Reference

Read an airspeed or differential pressure sensor via onboard ADC. More...

#include "modules/sensors/airspeed_adc.h"
#include "mcu_periph/adc.h"
#include <BOARD_CONFIG>
#include "generated/airframe.h"
#include "state.h"
#include "modules/core/abi.h"
#include "mcu_periph/sys_time.h"
#include "generated/modules.h"
Include dependency graph for airspeed_adc.c:

Go to the source code of this file.

Macros

#define USE_AIRSPEED_ADC   TRUE
#define ADC_CHANNEL_AIRSPEED_NB_SAMPLES   DEFAULT_AV_NB_SAMPLE

Functions

void airspeed_adc_init (void)
void airspeed_adc_update (void)

Variables

struct AirspeedAdc airspeed_adc
static struct adc_buf buf_airspeed

Detailed Description

Read an airspeed or differential pressure sensor via onboard ADC.

Definition in file airspeed_adc.c.

Macro Definition Documentation

◆ ADC_CHANNEL_AIRSPEED_NB_SAMPLES

#define ADC_CHANNEL_AIRSPEED_NB_SAMPLES   DEFAULT_AV_NB_SAMPLE

Definition at line 53 of file airspeed_adc.c.

Referenced by airspeed_adc_init().

◆ USE_AIRSPEED_ADC

#define USE_AIRSPEED_ADC   TRUE

Definition at line 36 of file airspeed_adc.c.

Function Documentation

◆ airspeed_adc_init()

void airspeed_adc_init ( void )

Definition at line 60 of file airspeed_adc.c.

References adc_buf_channel(), ADC_CHANNEL_AIRSPEED_NB_SAMPLES, airspeed_adc, and buf_airspeed.

Here is the call graph for this function:

◆ airspeed_adc_update()

void airspeed_adc_update ( void )

Definition at line 75 of file airspeed_adc.c.

References adc_buf_get(), airspeed_adc, AIRSPEED_ADC_ID, buf_airspeed, and get_sys_time_usec().

Here is the call graph for this function:

Variable Documentation

◆ airspeed_adc

struct AirspeedAdc airspeed_adc

Definition at line 44 of file airspeed_adc.c.

Referenced by airspeed_adc_init(), and airspeed_adc_update().

◆ buf_airspeed

struct adc_buf buf_airspeed
static

Definition at line 56 of file airspeed_adc.c.

Referenced by airspeed_adc_init(), and airspeed_adc_update().