Skip to content

Commit

Permalink
boards/b-l072z-lrwan1: add missing adc feature
Browse files Browse the repository at this point in the history
  • Loading branch information
gzordrai committed Jun 5, 2024
1 parent c20a9d1 commit c6d7b13
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions boards/b-l072z-lrwan1/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CPU = stm32
CPU_MODEL = stm32l072cz

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_dma
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtc
Expand Down
16 changes: 16 additions & 0 deletions boards/b-l072z-lrwan1/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @brief Peripheral MCU configuration for the ST B-L072Z-LRWAN1 board
*
* @author Alexandre Abadie <[email protected]>
* @author Thibault Tisserand <[email protected]>
*/

#ifndef PERIPH_CONF_H
Expand Down Expand Up @@ -147,6 +148,21 @@ static const spi_conf_t spi_config[] = {
#define SPI_NUMOF ARRAY_SIZE(spi_config)
/** @} */

/**
* @name ADC configuration
* @{
*/
static const adc_conf_t adc_config[] = {
{ GPIO_PIN(PORT_A, 0), 0 },
{ GPIO_PIN(PORT_A, 2), 2 },
{ GPIO_PIN(PORT_A, 3), 3 },
{ GPIO_PIN(PORT_A, 4), 4 },
{ GPIO_PIN(PORT_A, 5), 5 }
};

#define ADC_NUMOF ARRAY_SIZE(adc_config)
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit c6d7b13

Please sign in to comment.