Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
adc.h File Reference

arch independent ADC (Analog to Digital Converter) API More...

#include <inttypes.h>
#include "mcu_periph/adc_arch.h"
+ Include dependency graph for adc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  adc_buf
 Generic interface for all ADC hardware drivers, independent from microcontroller architecture. More...
 

Macros

#define MAX_AV_NB_SAMPLE   0x20
 
#define DEFAULT_AV_NB_SAMPLE   0x20
 

Functions

void adc_buf_channel (uint8_t adc_channel, struct adc_buf *s, uint8_t av_nb_sample)
 Registers a buffer to be used to store the specified converted channel Usage: More...
 
void adc_init (void)
 Starts conversions. More...
 

Detailed Description

arch independent ADC (Analog to Digital Converter) API

Facility to store last values in a circular buffer for a specific channel:

Definition in file adc.h.

Macro Definition Documentation

#define DEFAULT_AV_NB_SAMPLE   0x20

Definition at line 41 of file adc.h.

Referenced by baro_init(), electrical_init(), and sonar_adc_init().

#define MAX_AV_NB_SAMPLE   0x20

Definition at line 40 of file adc.h.

Function Documentation

void adc_buf_channel ( uint8_t  adc_channel,
struct adc_buf s,
uint8_t  av_nb_sample 
)

Registers a buffer to be used to store the specified converted channel Usage:

1 struct adc_buf channel_buf;
2 adc_buf_channel(1, &channel_buf, 12);

Registers channel_buf as buffer for ADC channel 1, with max index 12 (12 samples).

Registers a buffer to be used to store the specified converted channel Usage:

Definition at line 59 of file adc_arch.c.

References adc_buf::av_nb_sample, nb_adc1_channels, and nb_adc2_channels.

Referenced by adc_generic_init(), airspeed_adc_init(), aoa_adc_init(), baro_init(), electrical_init(), enose_init(), humid_hih_init(), imu_impl_init(), infrared_adc_init(), light_solar_init(), light_temt_init(), mf_ptu_init(), sonar_adc_init(), and temp_tcouple_adc_init().

+ Here is the caller graph for this function: