Skip to content
Closed
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
7 changes: 0 additions & 7 deletions boards/b-l072z-lrwan1/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ static const spi_conf_t spi_config[] = {
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_NUMOF (0)
/** @} */

/**
* @name RTC configuration
* @{
Expand Down
26 changes: 13 additions & 13 deletions boards/bluepill/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ extern "C" {
* @name ADC configuration
* @{
*/
#define ADC_CONFIG { \
{ .dev = 0, .pin = GPIO_PIN(PORT_A, 0), .chan = 0 }, \
{ .dev = 0, .pin = GPIO_PIN(PORT_A, 1), .chan = 1 }, \
{ .dev = 0, .pin = GPIO_PIN(PORT_A, 2), .chan = 2 }, \
{ .dev = 0, .pin = GPIO_PIN(PORT_A, 3), .chan = 3 }, \
{ .dev = 0, .pin = GPIO_PIN(PORT_A, 4), .chan = 4 }, \
{ .dev = 0, .pin = GPIO_PIN(PORT_A, 5), .chan = 5 }, \
{ .dev = 0, .pin = GPIO_PIN(PORT_A, 6), .chan = 6 }, \
{ .dev = 0, .pin = GPIO_PIN(PORT_A, 7), .chan = 7 }, \
{ .dev = 0, .pin = GPIO_PIN(PORT_B, 0), .chan = 8 }, \
{ .dev = 0, .pin = GPIO_PIN(PORT_B, 1), .chan = 9 }, \
}
static const adc_conf_t adc_config[] = {
{ .pin = GPIO_PIN(PORT_A, 0), .dev = ADC_1, .chan = 0 },
{ .pin = GPIO_PIN(PORT_A, 1), .dev = ADC_1, .chan = 1 },
{ .pin = GPIO_PIN(PORT_A, 2), .dev = ADC_1, .chan = 2 },
{ .pin = GPIO_PIN(PORT_A, 3), .dev = ADC_1, .chan = 3 },
{ .pin = GPIO_PIN(PORT_A, 4), .dev = ADC_1, .chan = 4 },
{ .pin = GPIO_PIN(PORT_A, 5), .dev = ADC_1, .chan = 5 },
{ .pin = GPIO_PIN(PORT_A, 6), .dev = ADC_1, .chan = 6 },
{ .pin = GPIO_PIN(PORT_A, 7), .dev = ADC_1, .chan = 7 },
{ .pin = GPIO_PIN(PORT_B, 0), .dev = ADC_1, .chan = 8 },
{ .pin = GPIO_PIN(PORT_B, 1), .dev = ADC_1, .chan = 9 },
};

#define ADC_NUMOF 10
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
/** @} */

/**
Expand Down
7 changes: 0 additions & 7 deletions boards/f4vi1/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,6 @@ static const uart_conf_t uart_config[] = {
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_NUMOF (0)
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
7 changes: 0 additions & 7 deletions boards/fox/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ extern "C" {
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_NUMOF (0)
/** @} */

/**
* @name Timer configuration
* @{
Expand Down
1 change: 1 addition & 0 deletions boards/iotlab-common/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtt
Expand Down
11 changes: 6 additions & 5 deletions boards/iotlab-common/include/periph_conf_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ extern "C" {
* @name ADC configuration
* @{
*/
#define ADC_CONFIG { \
{ GPIO_PIN(PORT_A,3), 0, 3 }, \
{ GPIO_UNDEF , 0, 16 }, \
{ GPIO_UNDEF , 0, 17 } }
static const adc_conf_t adc_config[] = {
{ .pin = GPIO_PIN(PORT_A, 0), .dev = ADC_1, .chan = 3 },
{ .pin = GPIO_UNDEF, .dev = ADC_1, .chan = 16 },
{ .pin = GPIO_UNDEF, .dev = ADC_1, .chan = 17 },
};

#define ADC_NUMOF (3)
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
/** @} */

/**
Expand Down
7 changes: 0 additions & 7 deletions boards/maple-mini/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ extern "C" {
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_NUMOF (0)
/** @} */

/**
* @name Timer configuration
* @{
Expand Down
13 changes: 5 additions & 8 deletions boards/msbiot/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,14 @@ static const pwm_conf_t pwm_config[] = {

/**
* @name ADC configuration
*
* We need to define the following fields:
* PIN, device (ADCx), channel
* @{
*/
#define ADC_CONFIG { \
{GPIO_PIN(PORT_B, 0), 0, 8}, \
{GPIO_PIN(PORT_B, 1), 0, 9} \
}
static const adc_conf_t adc_config[] = {
{ .pin = GPIO_PIN(PORT_B, 0), .dev = ADC_1, .chan = 8 },
{ .pin = GPIO_PIN(PORT_B, 1), .dev = ADC_1, .chan = 9 }
};

#define ADC_NUMOF (2)
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
/** @} */

/**
Expand Down
12 changes: 12 additions & 0 deletions boards/nucleo-common/include/arduino_pinmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ extern "C" {
#define ARDUINO_PIN_A5 GPIO_PIN(PORT_C, 0)
/** @ */

/**
* @name Map Arduino analog pins to RIOT ADC lines
* @{
*/
#define ARDUINO_A0 ADC_LINE(0)
#define ARDUINO_A1 ADC_LINE(1)
#define ARDUINO_A2 ADC_LINE(2)
#define ARDUINO_A3 ADC_LINE(3)
#define ARDUINO_A4 ADC_LINE(4)
#define ARDUINO_A5 ADC_LINE(5)
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
49 changes: 49 additions & 0 deletions boards/nucleo-common/include/periph_conf_nucleo64.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright (C) 2017 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/

/**
* @ingroup boards_nucleo-common
* @{
*
* @file
* @brief Shared peripheral MCU configuration for all nucleo64 boards
*
* @author Hauke Petersen <[email protected]>
*/

#ifndef PERIPH_CONF_NUCLEO64_H
#define PERIPH_CONF_NUCLEO64_H

#include "periph_cpu.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @name ADC configuration
* @{
*/
static const adc_conf_t adc_config[] = {
{ .pin = GPIO_PIN(PORT_A, 0), .dev = ADC_1, .chan = 0 },
{ .pin = GPIO_PIN(PORT_A, 1), .dev = ADC_1, .chan = 1 },
{ .pin = GPIO_PIN(PORT_A, 4), .dev = ADC_1, .chan = 4 },
{ .pin = GPIO_PIN(PORT_B, 0), .dev = ADC_1, .chan = 8 },
{ .pin = GPIO_PIN(PORT_C, 1), .dev = ADC_1, .chan = 11 },
{ .pin = GPIO_PIN(PORT_C, 0), .dev = ADC_1, .chan = 10 }
};

#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
/** @} */

#ifdef __cplusplus
}
#endif

#endif /* PERIPH_CONF_NUCLEO64_H */
/** @} */
18 changes: 1 addition & 17 deletions boards/nucleo-f030/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H

#include "periph_cpu.h"
#include "periph_conf_nucleo64.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -137,22 +137,6 @@ static const pwm_conf_t pwm_config[] = {
#define PWM_NUMOF (sizeof(pwm_config) / sizeof(pwm_config[0]))
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_CONFIG { \
{ GPIO_PIN(PORT_A, 0), 0 }, \
{ GPIO_PIN(PORT_A, 1), 1 }, \
{ GPIO_PIN(PORT_A, 4), 4 }, \
{ GPIO_PIN(PORT_B, 0), 8 }, \
{ GPIO_PIN(PORT_C, 1), 11 },\
{ GPIO_PIN(PORT_C, 0), 10 } \
}

#define ADC_NUMOF (6)
/** @} */

/**
* @name RTC configuration
* @{
Expand Down
18 changes: 1 addition & 17 deletions boards/nucleo-f070/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H

#include "periph_cpu.h"
#include "periph_conf_nucleo64.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -149,22 +149,6 @@ static const pwm_conf_t pwm_config[] = {
#define PWM_NUMOF (sizeof(pwm_config) / sizeof(pwm_config[0]))
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_CONFIG { \
{ GPIO_PIN(PORT_A, 0), 0 },\
{ GPIO_PIN(PORT_A, 1), 1 },\
{ GPIO_PIN(PORT_A, 4), 4 },\
{ GPIO_PIN(PORT_B, 0), 8 },\
{ GPIO_PIN(PORT_C, 1), 11 },\
{ GPIO_PIN(PORT_C, 0), 10 } \
}

#define ADC_NUMOF (6)
/** @} */

/**
* @name RTC configuration
* @{
Expand Down
18 changes: 1 addition & 17 deletions boards/nucleo-f072/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H

#include "periph_cpu.h"
#include "periph_conf_nucleo64.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -197,22 +197,6 @@ static const spi_conf_t spi_config[] = {
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_CONFIG { \
{ GPIO_PIN(PORT_A, 0), 0 }, \
{ GPIO_PIN(PORT_A, 1), 1 }, \
{ GPIO_PIN(PORT_A, 4), 4 }, \
{ GPIO_PIN(PORT_B, 0), 8 }, \
{ GPIO_PIN(PORT_C, 1), 11 },\
{ GPIO_PIN(PORT_C, 0), 10 } \
}

#define ADC_NUMOF (6)
/** @} */

/**
* @name RTC configuration
* @{
Expand Down
18 changes: 1 addition & 17 deletions boards/nucleo-f091/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H

#include "periph_cpu.h"
#include "periph_conf_nucleo64.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -200,22 +200,6 @@ static const pwm_conf_t pwm_config[] = {
#define RTC_NUMOF (1U)
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_CONFIG { \
{ GPIO_PIN(PORT_A, 0), 0 },\
{ GPIO_PIN(PORT_A, 1), 1 },\
{ GPIO_PIN(PORT_A, 4), 4 },\
{ GPIO_PIN(PORT_B, 0), 8 },\
{ GPIO_PIN(PORT_C, 1), 11 },\
{ GPIO_PIN(PORT_C, 0), 10 } \
}

#define ADC_NUMOF (6)
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
7 changes: 0 additions & 7 deletions boards/nucleo-f103/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ extern "C" {
#define CLOCK_PLL_MUL (9)
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_NUMOF (0)
/** @} */

/**
* @name Timer configuration
* @{
Expand Down
7 changes: 0 additions & 7 deletions boards/nucleo-f302/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ extern "C" {
#define CLOCK_PLL_MUL (9)
/** @} */

/**
* @name ADC configuration
* @{
*/
#define ADC_NUMOF (0)
/** @} */

/**
* @name Timer configuration
* @{
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo-f334/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H

#include "periph_cpu.h"
#include "periph_conf_nucleo64.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Loading