2018-10-28 19:42:48 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Inria
|
|
|
|
*
|
|
|
|
* 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_nrf52
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Default timer configuration for nRF52 based boards
|
|
|
|
*
|
|
|
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CFG_TIMER_DEFAULT_H
|
|
|
|
#define CFG_TIMER_DEFAULT_H
|
|
|
|
|
|
|
|
#include "periph_cpu.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name Timer configuration
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
static const timer_conf_t timer_config[] = {
|
|
|
|
{
|
|
|
|
.dev = NRF_TIMER1,
|
|
|
|
.channels = 3,
|
|
|
|
.bitmode = TIMER_BITMODE_BITMODE_32Bit,
|
|
|
|
.irqn = TIMER1_IRQn
|
2019-03-04 13:20:46 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.dev = NRF_TIMER2,
|
|
|
|
.channels = 3,
|
|
|
|
.bitmode = TIMER_BITMODE_BITMODE_08Bit,
|
|
|
|
.irqn = TIMER2_IRQn
|
2018-10-28 19:42:48 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#define TIMER_0_ISR isr_timer1
|
2019-03-04 13:20:46 +01:00
|
|
|
#define TIMER_1_ISR isr_timer2
|
2018-10-28 19:42:48 +01:00
|
|
|
|
2019-07-18 15:14:29 +02:00
|
|
|
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
2018-10-28 19:42:48 +01:00
|
|
|
/** @} */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* CFG_TIMER_DEFAULT_H */
|
|
|
|
/** @} */
|