Skip to content
Snippets Groups Projects
Commit 31c36d62 authored by Hauke Petersen's avatar Hauke Petersen
Browse files

boards/nrf51dongle: adapted timer configuration

parent 76dadd94
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#ifndef PERIPH_CONF_H #ifndef PERIPH_CONF_H
#define PERIPH_CONF_H #define PERIPH_CONF_H
#include "periph_cpu.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
...@@ -40,35 +42,14 @@ extern "C" { ...@@ -40,35 +42,14 @@ extern "C" {
* @name Timer configuration * @name Timer configuration
* @{ * @{
*/ */
#define TIMER_NUMOF (1U) static const timer_conf_t timer_config[] = {
#define TIMER_0_EN 1 /* dev, channels, width */
#define TIMER_1_EN 0 { NRF_TIMER0, 3, TIMER_BITMODE_BITMODE_24Bit, TIMER0_IRQn }
#define TIMER_2_EN 0 };
#define TIMER_IRQ_PRIO 1
/* Timer 0 configuration */
#define TIMER_0_DEV NRF_TIMER0
#define TIMER_0_CHANNELS 3
#define TIMER_0_MAX_VALUE (0xffffff)
#define TIMER_0_BITMODE TIMER_BITMODE_BITMODE_24Bit
#define TIMER_0_ISR isr_timer0 #define TIMER_0_ISR isr_timer0
#define TIMER_0_IRQ TIMER0_IRQn
/* Timer 1 configuration */
#define TIMER_1_DEV NRF_TIMER1
#define TIMER_1_CHANNELS 3
#define TIMER_1_MAX_VALUE (0xffff)
#define TIMER_1_BITMODE TIMER_BITMODE_BITMODE_16Bit
#define TIMER_1_ISR isr_timer1
#define TIMER_1_IRQ TIMER1_IRQn
/* Timer 2 configuration */ #define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
#define TIMER_2_DEV NRF_TIMER2
#define TIMER_2_CHANNELS 3
#define TIMER_2_MAX_VALUE (0xffff)
#define TIMER_2_BITMODE TIMER_BITMODE_BITMODE_16Bit
#define TIMER_2_ISR isr_timer2
#define TIMER_2_IRQ TIMER2_IRQn
/** @} */ /** @} */
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment