1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/cc2650stk/include/periph_conf.h

106 lines
2.0 KiB
C
Raw Normal View History

2016-01-23 14:41:09 +01:00
/*
* Copyright (C) 2016 Leon George
*
* 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_cc2650stk
* @{
*
* @file
* @brief Peripheral MCU configuration for the CC2650STK board
*
* @author Leon M. George <leon@georgemail.eu>
*/
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
2016-01-23 14:41:09 +01:00
#include "periph_cpu.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Clock configuration
2016-01-23 14:41:09 +01:00
* @{
*/
/* the main clock is fixed to 48MHZ */
#define CLOCK_CORECLOCK (48000000U)
/** @} */
/**
* @name Timer configuration
*
* General purpose timers (GPT[0-3]) are configured consecutively and in order
* (without gaps) starting from GPT0, i.e. if multiple timers are enabled.
*
2016-01-23 14:41:09 +01:00
* @{
*/
static const timer_conf_t timer_config[] = {
{
.cfg = GPT_CFG_16T,
.chn = 2,
2016-01-23 14:41:09 +01:00
},
{
.cfg = GPT_CFG_32T,
.chn = 1,
},
{
.cfg = GPT_CFG_16T,
.chn = 2,
},
{
.cfg = GPT_CFG_32T,
.chn = 1,
2016-01-23 14:41:09 +01:00
}
};
2019-07-18 15:14:29 +02:00
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
2016-01-23 14:41:09 +01:00
/** @} */
/**
* @name UART configuration
2016-01-23 14:41:09 +01:00
*
* The used CC26x0 CPU only supports a single UART device, so all we need to
* configure are the RX and TX pins.
*
* Optionally we can enable hardware flow control, by setting flow_control
* to 1 and defining pins for cts_pin and rts_pin.
2016-01-23 14:41:09 +01:00
* @{
*/
static const uart_conf_t uart_config[] = {
{
.regs = UART0,
.tx_pin = 29,
.rx_pin = 28,
.rts_pin = 0, /* ignored when flow_control is 0 */
.cts_pin = 0, /* ignored when flow_control is 0 */
.flow_control = 0,
.intn = UART0_IRQN
}
};
#define UART_NUMOF ARRAY_SIZE(uart_config)
2016-01-23 14:41:09 +01:00
/** @} */
2019-04-09 18:07:06 +02:00
/**
* @name I2C configuration
* @{
*/
#define I2C_NUMOF (1)
#define I2C_SDA_PIN (5)
#define I2C_SCL_PIN (6)
/** @} */
2016-01-23 14:41:09 +01:00
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
2016-01-23 14:41:09 +01:00
/** @} */