boards/sodaq-*: prefer default ADC config from Arduino
Right now the gain and reference are hard coded. Until it is configurable at runtime prefer the same default as with Arduino Core. That is, GAIN_DIV2 and REFSEL_INTVCC1. This way we can properly measure the battery voltage.
This commit is contained in:
parent
eb0595e4be
commit
2c41d7d707
@ -170,8 +170,8 @@ static const uart_conf_t uart_config[] = {
|
||||
#define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV512
|
||||
|
||||
#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG_GND
|
||||
#define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_1X
|
||||
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
|
||||
#define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_DIV2
|
||||
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
|
||||
|
||||
static const adc_conf_chan_t adc_channels[] = {
|
||||
/* port, pin, muxpos */
|
||||
|
||||
@ -163,8 +163,8 @@ static const uart_conf_t uart_config[] = {
|
||||
#define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV512
|
||||
|
||||
#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG_GND
|
||||
#define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_1X
|
||||
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
|
||||
#define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_DIV2
|
||||
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
|
||||
|
||||
static const adc_conf_chan_t adc_channels[] = {
|
||||
/* port, pin, muxpos */
|
||||
|
||||
@ -165,8 +165,8 @@ static const uart_conf_t uart_config[] = {
|
||||
#define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV512
|
||||
|
||||
#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG_GND
|
||||
#define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_1X
|
||||
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
|
||||
#define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_DIV2
|
||||
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
|
||||
|
||||
static const adc_conf_chan_t adc_channels[] = {
|
||||
/* port, pin, muxpos */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user