periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Ken Rabold
3  * 2019 Inria
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
10 #pragma once
11 
22 #include "periph_cpu.h"
23 #include "clk_conf.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
34 #define TIMER_NUMOF (1)
41 static const uart_conf_t uart_config[] = {
42  {
43  .addr = UART0_CTRL_ADDR,
44  .rx = GPIO_PIN(0, 16),
45  .tx = GPIO_PIN(0, 17),
46  .isr_num = INT_UART0_BASE,
47  },
48  {
49  .addr = UART1_CTRL_ADDR,
50  .rx = GPIO_PIN(0, 18),
51  .tx = GPIO_PIN(0, 23),
52  .isr_num = INT_UART1_BASE,
53  },
54 };
55 
56 #define UART_NUMOF ARRAY_SIZE(uart_config)
64 static const spi_conf_t spi_config[] = {
65  {
66  .addr = SPI1_CTRL_ADDR,
67  .mosi = GPIO_PIN(0, 3), /* D11 */
68  .miso = GPIO_PIN(0, 4), /* D12 */
69  .sclk = GPIO_PIN(0, 5), /* D13 */
70  },
71 };
72 
73 #define SPI_NUMOF ARRAY_SIZE(spi_config)
81 #define PWM_NUMOF (3)
84 #ifdef __cplusplus
85 }
86 #endif
87 
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:45
static const uart_conf_t uart_config[]
UART configuration.
Definition: periph_conf.h:38
static const spi_conf_t spi_config[]
SPI configuration.
Definition: periph_conf.h:96
SPI device configuration.
Definition: periph_cpu.h:336
uint32_t addr
SPI control register address.
Definition: periph_cpu.h:86
UART device configuration.
Definition: periph_cpu.h:217
uint32_t addr
UART control register address.
Definition: periph_cpu.h:62