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 "mii.h"
20#include "periph_cpu.h"
21#include "vendor/conf.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31#define TIMER_NUMOF (1U)
32#define TIMER_IRQ_PRIO 1
33
34/* Timer 0 configuration */
35#define TIMER_0_DEV LPC_TIM0
36#define TIMER_0_CHANNELS 4
37#define TIMER_0_FREQ (96000000ul)
38#define TIMER_0_MAX_VALUE (0xffffffff)
39#define TIMER_0_CLKEN() (LPC_SC->PCONP |= (1 << 1))
40#define TIMER_0_CLKDIS() (LPC_SC->PCONP &= ~(1 << 1))
41#define TIMER_0_PLKSEL() (LPC_SC->PCLKSEL0 |= (1 << 2))
42#define TIMER_0_ISR isr_timer0
43#define TIMER_0_IRQ TIMER0_IRQn
45
50static const uart_conf_t uart_config[] = {
51 {
52 .dev = (LPC_UART_TypeDef*)LPC_UART0,
53 .irq_rx = UART0_IRQn,
54 .clk_offset = 3,
55 .pinsel = 0,
56 .pinsel_shift = 2,
57 .pinsel_af = 1,
58 },
59 {
60 .dev = (LPC_UART_TypeDef*)LPC_UART3,
61 .irq_rx = UART3_IRQn,
62 .clk_offset = 25,
63 .pinsel = 0,
64 .pinsel_shift = 0,
65 .pinsel_af = 2
66 }
67};
68
69#define UART_IRQ_PRIO 1
70
71#define UART_0_ISR isr_uart0
72#define UART_1_ISR isr_uart3
73
74#define UART_NUMOF ARRAY_SIZE(uart_config)
75
77
87static const eth_conf_t eth_config = {
88 .phy_en_pin = GPIO_PIN(1, 27),
89 .phy_rst_pin = GPIO_PIN(1, 28),
91 .phy_addr = 1, /* TI DP83848 */
92};
94
95#ifdef __cplusplus
96}
97#endif
98
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:42
@ UART0_IRQn
UART0.
Definition cc2538.h:49
#define MII_BMCR_FULL_DPLX
Set for full duplex.
Definition mii.h:65
#define MII_BMCR_SPEED_100
Set speed to 100 Mbps.
Definition mii.h:69
Interface definition for MII/RMII h.
Ethernet peripheral configuration.
Definition periph_cpu.h:89
UART device configuration.
Definition periph_cpu.h:214