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 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #define XTAL_HZ (16000000U) /* the board provides a 16 MHz XTAL */
33 
34 #define CLOCK_CORECLOCK (72000000U) /* this board runs with 72MHz */
35 
36 #define CLOCK_PCLK (CLOCK_CORECLOCK)
43 #define TIMER_NUMOF (1U)
50 static const uart_conf_t uart_config[] = {
51  {
52  .dev = UART0,
53  .irq_prio_rx = 6,
54  .pinsel_rx = 0,
55  .pinsel_tx = 0,
56  .pinsel_msk_rx = BIT4,
57  .pinsel_msk_tx = BIT6,
58  }
59 };
60 
61 #define UART_NUMOF (1)
68 static const spi_conf_t spi_config[] = {
69  {
70  .dev = SPI0,
71  .pinsel_mosi = 3,
72  .pinsel_miso = 3,
73  .pinsel_clk = 3,
74  .pinsel_msk_mosi = (BIT16 | BIT17),
75  .pinsel_msk_miso = (BIT14 | BIT15),
76  .pinsel_msk_clk = (BIT8 | BIT9),
77  },
78 };
79 
80 #define SPI_NUMOF (1)
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif /* PERIPH_CONF_H */
#define BIT8
Bit 8 set define.
Definition: bitarithm.h:67
#define BIT17
Bit 17 set define.
Definition: bitarithm.h:80
#define BIT9
Bit 9 set define.
Definition: bitarithm.h:68
#define BIT14
Bit 14 set define.
Definition: bitarithm.h:75
#define BIT16
Bit 16 set define.
Definition: bitarithm.h:79
#define BIT4
Bit 4 set define.
Definition: bitarithm.h:63
#define BIT6
Bit 6 set define.
Definition: bitarithm.h:65
#define BIT15
Bit 15 set define.
Definition: bitarithm.h:76
static const uart_conf_t uart_config[]
UART configuration.
Definition: periph_conf.h:39
static const spi_conf_t spi_config[]
SPI configuration.
Definition: periph_conf.h:97
#define UART0
UART0 register bank.
SPI device configuration.
Definition: periph_cpu.h:337
SPI_t * dev
pointer to the used SPI device
Definition: periph_cpu.h:338
UART device configuration.
Definition: periph_cpu.h:218
USART_t * dev
pointer to the used UART device
Definition: periph_cpu.h:219