Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 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
19#ifndef PERIPH_CONF_H
20#define PERIPH_CONF_H
21
22#include "periph_cpu.h"
23#include "vendor/conf.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#define TIMER_NUMOF (1U)
34#define TIMER_IRQ_PRIO 1
35
36/* Timer 0 configuration */
37#define TIMER_0_DEV LPC_TIM0
38#define TIMER_0_CHANNELS 4
39#define TIMER_0_FREQ (96000000ul)
40#define TIMER_0_MAX_VALUE (0xffffffff)
41#define TIMER_0_CLKEN() (LPC_SC->PCONP |= (1 << 1))
42#define TIMER_0_CLKDIS() (LPC_SC->PCONP &= ~(1 << 1))
43#define TIMER_0_PLKSEL() (LPC_SC->PCLKSEL0 |= (1 << 2))
44#define TIMER_0_ISR isr_timer0
45#define TIMER_0_IRQ TIMER0_IRQn
52static const uart_conf_t uart_config[] = {
53 {
54 .dev = (LPC_UART_TypeDef*)LPC_UART0,
55 .irq_rx = UART0_IRQn,
56 .clk_offset = 3,
57 .pinsel = 0,
58 .pinsel_shift = 2,
59 .pinsel_af = 1,
60 },
61 {
62 .dev = (LPC_UART_TypeDef*)LPC_UART2,
63 .irq_rx = UART2_IRQn,
64 .clk_offset = 24,
65 .pinsel = 0,
66 .pinsel_shift = 10,
67 .pinsel_af = 1,
68 }
69};
70
71#define UART_IRQ_PRIO 1
72
73#define UART_0_ISR isr_uart0
74#define UART_1_ISR isr_uart2
75
76#define UART_NUMOF ARRAY_SIZE(uart_config)
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* PERIPH_CONF_H */
@ UART0_IRQn
UART0
Definition cc2538.h:53
UART device configuration.
Definition periph_cpu.h:218
USART_t * dev
pointer to the used UART device
Definition periph_cpu.h:219