Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/b-l072z-lrwan1: add missing adc feature #20733

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -49,7 +50,7 @@
#define DMA_SHARED_ISR_0 isr_dma1_channel2_3
#define DMA_SHARED_ISR_0_STREAMS { 0, 1 } /* Indexes 0 and 1 of dma_config share the same isr */
#define DMA_SHARED_ISR_1 isr_dma1_channel4_5_6_7
#define DMA_SHARED_ISR_1_STREAMS { 2, 3, 4 } /* Indexes 2, 3 and 4 of dma_config share the same isr */

Check warning on line 53 in boards/b-l072z-lrwan1/include/periph_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters

#define DMA_NUMOF ARRAY_SIZE(dma_config)
/** @} */
Expand Down Expand Up @@ -147,6 +148,21 @@
#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
Loading