Skip to content

Commit

Permalink
boards/m4a-24g: fixed:adc support deadcode
Browse files Browse the repository at this point in the history
  • Loading branch information
CW-75 committed Jul 4, 2022
1 parent 0b95240 commit 4f1dee6
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions boards/m4a-24g/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static const uart_conf_t uart_config[] = {{
#ifdef MODULE_PERIPH_UART_HW_FC
.tx_pad = UART_PAD_TX_0_RTS_2_CTS_3,
#else
.tx_pad = UART_PAD_TX_0,
.tx_pad = UART_PAD_TX_0,
#endif
.flags = UART_FLAG_NONE,
.gclk_src = SAM0_GCLK_MAIN,
Expand All @@ -200,7 +200,7 @@ static const uart_conf_t uart_config[] = {{
#ifdef MODULE_PERIPH_UART_HW_FC
.tx_pad = UART_PAD_TX_0_RTS_2_CTS_3,
#else
.tx_pad = UART_PAD_TX_0,
.tx_pad = UART_PAD_TX_0,
#endif
.flags = UART_FLAG_NONE,
.gclk_src = SAM0_GCLK_MAIN,
Expand Down Expand Up @@ -371,30 +371,26 @@ static const i2c_conf_t i2c_config[] = {{.dev = &(SERCOM3->I2CM),
/** @} */

#ifdef CONFIG_ADC_VREF_DEFAULT
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
#endif
#ifdef CONFIG_ADC_VREF_INTVCC0
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC0
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC0
#endif
#ifdef CONFIG_ADC_VREF_INTVCC1
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
#endif
#ifdef CONFIG_ADC_VREF_EXT1
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_AREFA
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_AREFA
#endif
#ifdef CONFIG_ADC_VREF_EXT1
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_AREFB
#undef ADC_REF_DEFAULT
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_AREFB
#endif
// #ifdef ADC_REF_DEFAULT
// #undef ADC_REF_DEFAULT

// #endif
// #endif
/**
* @brief ADC configuration
*/
Expand Down

0 comments on commit 4f1dee6

Please sign in to comment.