The friendly Operating System for the Internet of Things
boards/seeeduino_arch-pro/include/periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
20 #ifndef PERIPH_CONF_H
21 #define PERIPH_CONF_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
31 #define TIMER_NUMOF (1U)
32 #define TIMER_0_EN 1
33 #define TIMER_IRQ_PRIO 1
34 
35 /* Timer 0 configuration */
36 #define TIMER_0_DEV LPC_TIM0
37 #define TIMER_0_CHANNELS 4
38 #define TIMER_0_FREQ (96000000ul)
39 #define TIMER_0_MAX_VALUE (0xffffffff)
40 #define TIMER_0_CLKEN() (LPC_SC->PCONP |= (1 << 1))
41 #define TIMER_0_CLKDIS() (LPC_SC->PCONP &= ~(1 << 1))
42 #define TIMER_0_PLKSEL() (LPC_SC->PCLKSEL0 |= (1 << 2))
43 #define TIMER_0_ISR isr_timer0
44 #define TIMER_0_IRQ TIMER0_IRQn
45 
51 #define UART_NUMOF (2U)
52 #define UART_0_EN 1
53 #define UART_1_EN 1
54 #define UART_IRQ_PRIO 1
55 
56 /* UART 0 device configuration */
57 #define UART_0_DEV LPC_UART0
58 #define UART_0_CLKSEL() (LPC_SC->PCLKSEL0 &= ~(0x3 << 6)) /* PCLK := CCLK / 4 */
59 #define UART_0_CLKEN() (LPC_SC->PCONP |= (1 << 3))
60 #define UART_0_CLKDIS() (LPC_SC->PCONP &= ~(1 << 3))
61 #define UART_0_IRQ UART0_IRQn
62 #define UART_0_ISR isr_uart0
63 /* UART 0 pin configuration */
64 #define UART_0_TX_PINSEL (LPC_PINCON->PINSEL0)
65 #define UART_0_RX_PINSEL (LPC_PINCON->PINSEL0)
66 #define UART_0_TX_PINMODE (LPC_PINCON->PINMODE0)
67 #define UART_0_RX_PINMODE (LPC_PINCON->PINMODE0)
68 #define UART_0_TX_PIN (3)
69 #define UART_0_RX_PIN (2)
70 #define UART_0_AF (1)
71 
72 /* UART 1 device configuration */
73 #define UART_1_DEV LPC_UART3
74 #define UART_1_CLKSEL() (LPC_SC->PCLKSEL1 &= ~(0x3 << 18)) /* PCLK := CCLK / 4 */
75 #define UART_1_CLKEN() (LPC_SC->PCONP |= (1 << 25))
76 #define UART_1_CLKDIS() (LPC_SC->PCONP &= ~(1 << 25))
77 #define UART_1_IRQ UART3_IRQn
78 #define UART_1_ISR isr_uart3
79 /* UART 1 pin configuration */
80 #define UART_1_TX_PINSEL (LPC_PINCON->PINSEL0)
81 #define UART_1_RX_PINSEL (LPC_PINCON->PINSEL0)
82 #define UART_1_TX_PINMODE (LPC_PINCON->PINMODE0)
83 #define UART_1_RX_PINMODE (LPC_PINCON->PINMODE0)
84 #define UART_1_RX_PIN (0)
85 #define UART_1_TX_PIN (1)
86 #define UART_1_AF (2)
87 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif /* PERIPH_CONF_H */
94