Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
periph_conf.h
Go to the documentation of this file.
1
/*
2
* Copyright(C) 2016,2017, Imagination Technologies Limited and/or its
3
* affiliated group companies.
4
*
5
* This file is subject to the terms and conditions of the GNU Lesser
6
* General Public License v2.1. See the file LICENSE in the top level
7
* directory for more details.
8
*
9
*/
10
20
#ifndef PERIPH_CONF_H
21
#define PERIPH_CONF_H
22
23
#include "cpu.h"
24
#include "periph_cpu.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define PERIPHERAL_CLOCK (100000000)
/* Hz */
35
40
#define TIMER_NUMOF (1)
41
#define TIMER_0_CHANNELS (3)
42
48
static
const
uart_conf_t
uart_config[] = {
49
{
/* Virtual COM port */
50
.
base
= (
volatile
unsigned
int
*)_UART4_BASE_ADDRESS,
51
.clock =
PERIPHERAL_CLOCK
,
52
.rx_pin =
GPIO_PIN
(
PORT_F
, 2),
53
.tx_pin =
GPIO_PIN
(
PORT_F
, 8),
54
.rx_mux_reg = &U4RXR,
55
.tx_mux_reg = &RPF8R,
56
.rx_af =
GPIO_AF11
,
57
.tx_af =
GPIO_AF2
,
58
.vector = _UART4_RX_VECTOR,
59
},
60
};
61
62
#define UART_0_ISR (isr_usart4)
63
#define UART_NUMOF ((unsigned int)ARRAY_SIZE(uart_config))
64
66
#ifdef __cplusplus
67
}
68
#endif
69
70
#endif
/* PERIPH_CONF_H */
71
GPIO_AF11
@ GPIO_AF11
use alternate function 11
Definition:
periph_cpu_common.h:97
uart_conf_t
UART device configuration.
Definition:
periph_cpu.h:166
PORT_F
@ PORT_F
port F
Definition:
periph_cpu.h:41
uart_conf_t::base
volatile unsigned int * base
UART device base register address.
Definition:
periph_cpu_common.h:108
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition:
periph_cpu.h:35
GPIO_AF2
@ GPIO_AF2
use alternate function 2
Definition:
periph_cpu_common.h:88
PERIPHERAL_CLOCK
#define PERIPHERAL_CLOCK
The peripheral clock is required for the UART Baud rate calculation It is configured by the 'config' ...
Definition:
periph_conf.h:34
Generated on Tue Nov 24 2020 19:46:50 by
1.8.17