Loading...
Searching...
No Matches
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
9#pragma once
10
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
47
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_UART3,
63 .irq_rx = UART3_IRQn,
64 .clk_offset = 25,
65 .pinsel = 0,
66 .pinsel_shift = 0,
67 .pinsel_af = 2
68 }
69};
70
71#define UART_IRQ_PRIO 1
72
73#define UART_0_ISR isr_uart0
74#define UART_1_ISR isr_uart3
75
76#define UART_NUMOF ARRAY_SIZE(uart_config)
77
79
80#ifdef __cplusplus
81}
82#endif
83
@ UART0_IRQn
UART0.
Definition cc2538.h:52
UART device configuration.
Definition periph_cpu.h:217