mirror of https://github.com/rusefi/wideband.git
analog works
This commit is contained in:
parent
3e90915d48
commit
55d693e9a5
|
@ -2,14 +2,18 @@
|
||||||
|
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
|
|
||||||
|
#define ADC_CHANNEL_COUNT 3
|
||||||
#define ADC_OVERSAMPLE 8
|
#define ADC_OVERSAMPLE 8
|
||||||
|
|
||||||
static adcsample_t adcBuffer[3 * ADC_OVERSAMPLE];
|
static adcsample_t adcBuffer[ADC_CHANNEL_COUNT * ADC_OVERSAMPLE];
|
||||||
|
|
||||||
ADCConversionGroup convGroup =
|
ADCConversionGroup convGroup =
|
||||||
{
|
{
|
||||||
false, 3, nullptr, nullptr,
|
false,
|
||||||
0, // CFGR1
|
ADC_CHANNEL_COUNT,
|
||||||
|
nullptr,
|
||||||
|
nullptr,
|
||||||
|
ADC_CFGR1_CONT | ADC_CFGR1_RES_12BIT, // CFGR1
|
||||||
ADC_TR(0, 0), // TR
|
ADC_TR(0, 0), // TR
|
||||||
ADC_SMPR_SMP_28P5, // SMPR
|
ADC_SMPR_SMP_28P5, // SMPR
|
||||||
ADC_CHSELR_CHSEL0 | ADC_CHSELR_CHSEL1 | ADC_CHSELR_CHSEL2
|
ADC_CHSELR_CHSEL0 | ADC_CHSELR_CHSEL1 | ADC_CHSELR_CHSEL2
|
||||||
|
|
Loading…
Reference in New Issue