mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/nucleo-g070rb: Added ADCs 0-5 for g070 nucleo
This commit is contained in:
parent
6414c64f89
commit
f278df5c96
@ -15,6 +15,7 @@ config BOARD_NUCLEO_G070RB
|
|||||||
select CPU_MODEL_STM32G070RB
|
select CPU_MODEL_STM32G070RB
|
||||||
|
|
||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
select HAS_PERIPH_ADC
|
||||||
select HAS_PERIPH_I2C
|
select HAS_PERIPH_I2C
|
||||||
select HAS_PERIPH_SPI
|
select HAS_PERIPH_SPI
|
||||||
select HAS_PERIPH_TIMER
|
select HAS_PERIPH_TIMER
|
||||||
|
@ -2,6 +2,7 @@ CPU = stm32
|
|||||||
CPU_MODEL = stm32g070rb
|
CPU_MODEL = stm32g070rb
|
||||||
|
|
||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
FEATURES_PROVIDED += periph_adc
|
||||||
FEATURES_PROVIDED += periph_i2c
|
FEATURES_PROVIDED += periph_i2c
|
||||||
FEATURES_PROVIDED += periph_spi
|
FEATURES_PROVIDED += periph_spi
|
||||||
FEATURES_PROVIDED += periph_timer
|
FEATURES_PROVIDED += periph_timer
|
||||||
|
@ -86,6 +86,27 @@ static const uart_conf_t uart_config[] = {
|
|||||||
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name ADC configuration
|
||||||
|
*
|
||||||
|
* Note that we do not configure all ADC channels,
|
||||||
|
* and not in the STM32G070 order. Instead, we
|
||||||
|
* just define 6 ADC channels, for the Nucleo
|
||||||
|
* Arduino header pins A0-A5
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const adc_conf_t adc_config[] = {
|
||||||
|
{ .pin = GPIO_PIN(PORT_A, 0), .dev = 0, .chan = 0 },
|
||||||
|
{ .pin = GPIO_PIN(PORT_A, 1), .dev = 0, .chan = 1 },
|
||||||
|
{ .pin = GPIO_PIN(PORT_A, 4), .dev = 0, .chan = 4 },
|
||||||
|
{ .pin = GPIO_PIN(PORT_B, 1), .dev = 0, .chan = 9 },
|
||||||
|
{ .pin = GPIO_PIN(PORT_B, 11), .dev = 0, .chan = 15 },
|
||||||
|
{ .pin = GPIO_PIN(PORT_B, 12), .dev = 0, .chan = 16 },
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name SPI configuration
|
* @name SPI configuration
|
||||||
* @{
|
* @{
|
||||||
|
Loading…
Reference in New Issue
Block a user