1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/common/cc2538/include/cfg_timer_default.h
2020-03-30 16:09:18 +02:00

69 lines
1.4 KiB
C

/*
* Copyright (C) 2014-2016 Freie Universität Berlin
* 2015 Zolertia SL
*
* 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_common_cc2538
* @{
*
* @file
* @brief Common default timer configuration for cc2538 boards
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
* @author Antonio Lignan <alinan@zolertia.com>
* @author Sebastian Meiling <s@mlng.net>
*/
#ifndef CFG_TIMER_DEFAULT_H
#define CFG_TIMER_DEFAULT_H
#include "periph_cpu.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @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.
*
* @{
*/
static const timer_conf_t timer_config[] = {
{
.chn = 2,
.cfg = GPTMCFG_16_BIT_TIMER, /* required for XTIMER */
},
{
.chn = 2,
.cfg = GPTMCFG_16_BIT_TIMER,
},
{
.chn = 1,
.cfg = GPTMCFG_32_BIT_TIMER,
},
{
.chn = 1,
.cfg = GPTMCFG_32_BIT_TIMER,
},
};
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
#define TIMER_IRQ_PRIO 1
/** @} */
#ifdef __cplusplus
} /* end extern "C" */
#endif
#endif /* CFG_TIMER_DEFAULT_H */
/** @} */