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 
45 static const timer_conf_t timer_config[] = {
46  {
47  .chn = 2,
48  .cfg = GPTMCFG_16_BIT_TIMER, /* required for XTIMER */
49  },
50  {
51  .chn = 1,
52  .cfg = GPTMCFG_32_BIT_TIMER,
53  },
54  {
55  .chn = 2,
56  .cfg = GPTMCFG_16_BIT_TIMER,
57  },
58  {
59  .chn = 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 
81 #define UART_NUMOF (1U)
82 #define UART_0_EN 1
83 #define UART_IRQ_PRIO 1
84 
85 /* UART 0 device configuration */
86 #define UART_0_DEV UART0
87 #define UART_0_IRQ UART0_IRQn
88 #define UART_0_ISR isr_uart0
89 /* UART 0 pin configuration */
90 #define UART_0_TX_PIN GPIO_PIN(0, 1)
91 #define UART_0_RX_PIN GPIO_PIN(0, 0)
94 #ifdef __cplusplus
95 } /* end extern "C" */
96 #endif
97 
98 #endif /* PERIPH_COMMON_H */
99 
uint_fast8_t chn
number of channels
16-bit timer configuration
32-bit timer configuration
Timer configuration.