mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-02 13:27:32 +08:00
[mcu_periph] set ADC_RESOLUTION in arch headers
This commit is contained in:
@@ -32,6 +32,11 @@
|
|||||||
|
|
||||||
#include BOARD_CONFIG
|
#include BOARD_CONFIG
|
||||||
|
|
||||||
|
/* Set the correct ADC resolution */
|
||||||
|
#ifndef ADC_RESOLUTION
|
||||||
|
#define ADC_RESOLUTION 1024
|
||||||
|
#endif
|
||||||
|
|
||||||
/** 8 ADCs for bank 0, others for bank 2 */
|
/** 8 ADCs for bank 0, others for bank 2 */
|
||||||
#define NB_ADC 8
|
#define NB_ADC 8
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,11 @@
|
|||||||
|
|
||||||
#include BOARD_CONFIG
|
#include BOARD_CONFIG
|
||||||
|
|
||||||
|
/* Set the correct ADC resolution */
|
||||||
|
#ifndef ADC_RESOLUTION
|
||||||
|
#define ADC_RESOLUTION 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
enum adc1_channels {
|
enum adc1_channels {
|
||||||
#ifdef AD1_1_CHANNEL
|
#ifdef AD1_1_CHANNEL
|
||||||
AD1_1,
|
AD1_1,
|
||||||
|
|||||||
@@ -45,15 +45,6 @@
|
|||||||
microcontroller architecture.
|
microcontroller architecture.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Set the correct ADC resolution */
|
|
||||||
#ifndef ADC_RESOLUTION
|
|
||||||
#if defined(STM32F1) || defined(STM32F4)
|
|
||||||
#define ADC_RESOLUTION 4096
|
|
||||||
#else
|
|
||||||
#define ADC_RESOLUTION 1024
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Struct to collect samples from ADC and building an average
|
Struct to collect samples from ADC and building an average
|
||||||
over MAX_AV_NB_SAMPLE values.
|
over MAX_AV_NB_SAMPLE values.
|
||||||
|
|||||||
Reference in New Issue
Block a user