2018-10-24 17:55:23 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Inria
|
2019-06-04 12:59:59 +02:00
|
|
|
* 2019 Freie Universität Berlin
|
2018-10-24 17:55:23 +02:00
|
|
|
*
|
|
|
|
* 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_nrf51
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
2019-06-04 12:59:59 +02:00
|
|
|
* @brief Shared timer peripheral configuration mapping timers 0 and 1
|
2018-10-24 17:55:23 +02:00
|
|
|
*
|
|
|
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
2019-06-04 12:59:59 +02:00
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
2018-10-24 17:55:23 +02:00
|
|
|
*/
|
|
|
|
|
2019-06-04 12:59:59 +02:00
|
|
|
#ifndef CFG_TIMER_01_H
|
|
|
|
#define CFG_TIMER_01_H
|
2018-10-24 17:55:23 +02:00
|
|
|
|
|
|
|
#include "periph_cpu.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name Timer configuration
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
static const timer_conf_t timer_config[] = {
|
2019-06-04 12:59:59 +02:00
|
|
|
{
|
|
|
|
.dev = NRF_TIMER0,
|
|
|
|
.channels = 3,
|
|
|
|
.bitmode = TIMER_BITMODE_BITMODE_24Bit,
|
|
|
|
.irqn = TIMER0_IRQn,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.dev = NRF_TIMER1,
|
|
|
|
.channels = 3,
|
|
|
|
.bitmode = TIMER_BITMODE_BITMODE_16Bit,
|
|
|
|
.irqn = TIMER1_IRQn,
|
|
|
|
}
|
2018-10-24 17:55:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#define TIMER_0_ISR isr_timer0
|
2019-06-04 12:59:59 +02:00
|
|
|
#define TIMER_1_ISR isr_timer1
|
2018-10-24 17:55:23 +02:00
|
|
|
|
2019-07-18 15:14:29 +02:00
|
|
|
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
2018-10-24 17:55:23 +02:00
|
|
|
/** @} */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* end extern "C" */
|
|
|
|
#endif
|
|
|
|
|
2019-06-04 12:59:59 +02:00
|
|
|
#endif /* CFG_TIMER_01_H */
|