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
arch independent ADC (Analog to Digital Converter) API
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.
void adc_generic_periodic(void)
void adc_generic_init(void)
uint16_t adc_generic_val1
#define ADC_CHANNEL_GENERIC_NB_SAMPLES
static void adc_msg_send(struct transport_tx *trans, struct link_device *dev)
uint16_t adc_generic_val2
This module can be used to read one or two values from the ADC channels in a generic way.
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.
Common code for AP and FBW telemetry.
static const struct usb_device_descriptor dev
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.