Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "periph_cpu.h"
20#include "vendor/conf.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#define TIMER_NUMOF (1U)
31#define TIMER_IRQ_PRIO 1
32
33/* Timer 0 configuration */
34#define TIMER_0_DEV LPC_TIM0
35#define TIMER_0_CHANNELS 4
36#define TIMER_0_FREQ (96000000ul)
37#define TIMER_0_MAX_VALUE (0xffffffff)
38#define TIMER_0_CLKEN() (LPC_SC->PCONP |= (1 << 1))
39#define TIMER_0_CLKDIS() (LPC_SC->PCONP &= ~(1 << 1))
40#define TIMER_0_PLKSEL() (LPC_SC->PCLKSEL0 |= (1 << 2))
41#define TIMER_0_ISR isr_timer0
42#define TIMER_0_IRQ TIMER0_IRQn
44
49static const uart_conf_t uart_config[] = {
50 {
51 .dev = (LPC_UART_TypeDef*)LPC_UART0,
52 .irq_rx = UART0_IRQn,
53 .clk_offset = 3,
54 .pinsel = 0,
55 .pinsel_shift = 2,
56 .pinsel_af = 1,
57 },
58 {
59 .dev = (LPC_UART_TypeDef*)LPC_UART3,
60 .irq_rx = UART3_IRQn,
61 .clk_offset = 25,
62 .pinsel = 0,
63 .pinsel_shift = 0,
64 .pinsel_af = 2
65 }
66};
67
68#define UART_IRQ_PRIO 1
69
70#define UART_0_ISR isr_uart0
71#define UART_1_ISR isr_uart3
72
73#define UART_NUMOF ARRAY_SIZE(uart_config)
74
76
77#ifdef __cplusplus
78}
79#endif
80
@ UART0_IRQn
UART0.
Definition cc2538.h:49
UART device configuration.
Definition periph_cpu.h:214