|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
35 #include "pprzlink/messages.h"
41 #ifndef ADC_CHANNEL_GENERIC1
42 #ifndef ADC_CHANNEL_GENERIC2
43 #error "at least one ADC_CHANNEL_GENERIC1/2 needs to be defined to use the generic_adc module"
47 #ifndef ADC_CHANNEL_GENERIC_NB_SAMPLES
48 #define ADC_CHANNEL_GENERIC_NB_SAMPLES DEFAULT_AV_NB_SAMPLE
51 #if PERIODIC_TELEMETRY
55 #ifndef ADC_GENERIC_PERIODIC_SEND
56 #define ADC_GENERIC_PERIODIC_SEND TRUE
59 #ifdef ADC_CHANNEL_GENERIC1
60 static struct adc_buf buf_generic1;
63 #ifdef ADC_CHANNEL_GENERIC2
64 static struct adc_buf buf_generic2;
68 #ifdef ADC_CHANNEL_GENERIC1
71 #ifdef ADC_CHANNEL_GENERIC2
82 #ifdef ADC_CHANNEL_GENERIC1
85 #ifdef ADC_CHANNEL_GENERIC2
88 #if PERIODIC_TELEMETRY
96 #if ADC_GENERIC_PERIODIC_SEND
void adc_buf_channel(uint8_t adc_channel, struct adc_buf *s, uint8_t av_nb_sample)
Link between ChibiOS ADC drivers and Paparazzi adc_buffers.
arch independent ADC (Analog to Digital Converter) API
uint16_t adc_generic_val2
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
static const struct usb_device_descriptor dev
void adc_generic_init(void)
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
void adc_generic_periodic(void)
Common code for AP and FBW telemetry.
#define ADC_CHANNEL_GENERIC_NB_SAMPLES
uint16_t adc_generic_val1
#define DefaultPeriodic
Set default periodic telemetry.
static void adc_msg_send(struct transport_tx *trans, struct link_device *dev)
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.