mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards: adapt ADC config of cc2538 based boards
adapted boards are: cc2538dk, openmote-cc2538, remote-pa, remote-reva, and remote-revb.
This commit is contained in:
parent
b30d0617aa
commit
bfae64d670
@ -6,6 +6,7 @@ FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += cpp
|
||||
|
@ -143,6 +143,19 @@ static const spi_conf_t spi_config[] = {
|
||||
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name ADC configuration
|
||||
* @{
|
||||
*/
|
||||
#define SOC_ADC_ADCCON_REF SOC_ADC_ADCCON_REF_AVDD5
|
||||
|
||||
static const adc_conf_t adc_config[] = {
|
||||
GPIO_PIN(0, 6), /**< GPIO_PA6 = ADC_ALS_PIN */
|
||||
};
|
||||
|
||||
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Radio peripheral configuration
|
||||
* @{
|
||||
|
@ -6,6 +6,7 @@ FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += cpp
|
||||
|
@ -14,6 +14,7 @@
|
||||
* @brief Peripheral MCU configuration for the OpenMote-cc2538 board
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
* @author Sebastian Meiling <s@mlng.net>
|
||||
*/
|
||||
|
||||
#ifndef PERIPH_CONF_H
|
||||
@ -64,6 +65,23 @@ static const timer_conf_t timer_config[] = {
|
||||
#define TIMER_IRQ_PRIO 1
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name ADC configuration
|
||||
* @{
|
||||
*/
|
||||
#define SOC_ADC_ADCCON_REF SOC_ADC_ADCCON_REF_AVDD5
|
||||
|
||||
static const adc_conf_t adc_config[] = {
|
||||
GPIO_PIN(0, 2), /**< GPIO_PA2 = AD4_PIN */
|
||||
GPIO_PIN(0, 3), /**< GPIO_PA3 = CTS_DI07_PIN */
|
||||
GPIO_PIN(0, 4), /**< GPIO_PA4 = AD5_PIN */
|
||||
GPIO_PIN(0, 5), /**< GPIO_PA5 = AD6_PIN */
|
||||
GPIO_PIN(0, 6), /**< GPIO_PA6 = ON_SLEEP_PIN */
|
||||
};
|
||||
|
||||
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name UART configuration
|
||||
* @{
|
||||
|
@ -6,6 +6,7 @@ FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += cpp
|
||||
|
@ -16,6 +16,7 @@
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
* @author Antonio Lignan <alinan@zolertia.com>
|
||||
* @author Sebastian Meiling <s@mlng.net>
|
||||
*/
|
||||
|
||||
#ifndef PERIPH_CONF_H
|
||||
@ -106,6 +107,20 @@ static const spi_conf_t spi_config[] = {
|
||||
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name ADC configuration
|
||||
* @{
|
||||
*/
|
||||
#define SOC_ADC_ADCCON_REF SOC_ADC_ADCCON_REF_AVDD5
|
||||
|
||||
static const adc_conf_t adc_config[] = {
|
||||
GPIO_PIN(0, 6), /**< GPIO_PA6 = ADC2_PIN */
|
||||
GPIO_PIN(0, 7), /**< GPIO_PA7 = ADC3_PIN */
|
||||
};
|
||||
|
||||
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end extern "C" */
|
||||
#endif
|
||||
|
@ -6,6 +6,7 @@ FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += cpp
|
||||
|
@ -27,6 +27,7 @@ In terms of hardware support, the following drivers have been implemented:
|
||||
* I2C/SPI library
|
||||
* LEDs
|
||||
* Buttons
|
||||
* ADC
|
||||
* RF switch to programatically drive either 2.4GHz or sub-1GHz to a single RP-SMA
|
||||
* RF 2.4GHz built-in in CC2538
|
||||
|
||||
@ -35,7 +36,6 @@ And under work or pending at cc2538 base cpu:
|
||||
* Built-in core temperature and battery sensor.
|
||||
* CC1200 sub-1GHz radio interface.
|
||||
* Micro-SD external storage.
|
||||
* ADC
|
||||
* USB (in CDC-ACM).
|
||||
* uDMA Controller.
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
* @author Antonio Lignan <alinan@zolertia.com>
|
||||
* @author Sebastian Meiling <s@mlng.net>
|
||||
*/
|
||||
|
||||
#ifndef PERIPH_CONF_H
|
||||
@ -107,6 +108,24 @@ static const spi_conf_t spi_config[] = {
|
||||
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name ADC configuration
|
||||
* @{
|
||||
*/
|
||||
#define SOC_ADC_ADCCON_REF SOC_ADC_ADCCON_REF_AVDD5
|
||||
|
||||
static const adc_conf_t adc_config[] = {
|
||||
GPIO_PIN(0, 5), /**< GPIO_PA5 = ADC1_PIN */
|
||||
GPIO_PIN(0, 4), /**< GPIO_PA4 = ADC2_PIN */
|
||||
/* voltage divider with 5/3 relationship to allow 5V sensors */
|
||||
GPIO_PIN(0, 2), /**< GPIO_PA2 = ADC3_PIN */
|
||||
};
|
||||
|
||||
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
|
||||
/** @} */
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end extern "C" */
|
||||
#endif
|
||||
|
@ -6,6 +6,7 @@ FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += cpp
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Freie Universität Berlin
|
||||
* Copyright (C) 2015 Zolertia SL
|
||||
* 2017 HAW Hamburg
|
||||
*
|
||||
* 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
|
||||
@ -15,7 +16,8 @@
|
||||
* @brief Peripheral MCU configuration for the RE-Mote board revision B
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
* Antonio Lignan <alinan@zolertia.com>
|
||||
* @author Antonio Lignan <alinan@zolertia.com>
|
||||
* @author Sebastian Meiling <s@mlng.net>
|
||||
*/
|
||||
|
||||
#ifndef PERIPH_CONF_H
|
||||
@ -105,10 +107,25 @@ static const spi_conf_t spi_config[] = {
|
||||
.cs_pin = GPIO_PA7
|
||||
}
|
||||
};
|
||||
|
||||
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name ADC configuration
|
||||
* @{
|
||||
*/
|
||||
#define SOC_ADC_ADCCON_REF SOC_ADC_ADCCON_REF_AVDD5
|
||||
|
||||
static const adc_conf_t adc_config[] = {
|
||||
GPIO_PIN(0, 5), /**< GPIO_PA5 = ADC1_PIN */
|
||||
GPIO_PIN(0, 4), /**< GPIO_PA4 = ADC2_PIN */
|
||||
/* voltage divider with 5/3 relationship to allow 5V sensors */
|
||||
GPIO_PIN(0, 2), /**< GPIO_PA2 = ADC3_PIN */
|
||||
};
|
||||
|
||||
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end extern "C" */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user