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