periph_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universit├Ąt Berlin
3  * Copyright (C) 2015 Zolertia SL
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
21 #ifndef PERIPH_COMMON_H
22 #define PERIPH_COMMON_H
23 
24 #include "periph_cpu.h"
25 
26 #ifdef __cplusplus
27  extern "C" {
28 #endif
29 
34 #define CLOCK_CORECLOCK (32000000U) /* 32MHz */
35 
41 static const timer_conf_t timer_config[] = {
42  {
43  .dev = GPTIMER0,
44  .channels = 2,
45  .cfg = GPTMCFG_16_BIT_TIMER, /* required for XTIMER */
46  },
47  {
48  .dev = GPTIMER1,
49  .channels = 1,
50  .cfg = GPTMCFG_32_BIT_TIMER,
51  },
52  {
53  .dev = GPTIMER2,
54  .channels = 1,
55  .cfg = GPTMCFG_32_BIT_TIMER,
56  },
57  {
58  .dev = GPTIMER3,
59  .channels = 1,
60  .cfg = GPTMCFG_32_BIT_TIMER,
61  },
62 };
63 
64 #define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
65 
66 #define TIMER_IRQ_PRIO 1
67 
73 #define RADIO_IRQ_PRIO 1
74 
76 #ifdef __cplusplus
77 } /* end extern "C" */
78 #endif
79 
80 #endif /* PERIPH_COMMON_H */
81 
#define GPTIMER2
GPTIMER2 Instance.
#define GPTIMER1
GPTIMER1 Instance.
#define GPTIMER0
GPTIMER0 Instance.
16-bit timer configuration
32-bit timer configuration
#define GPTIMER3
GPTIMER3 Instance.
cc2538_gptimer_t * dev
timer device
Timer configuration data.