blob: 01915886dc024923a5abdacb8c2d9eade70055b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2013-11-15 bright the first version
*/
#ifndef __USART_H__
#define __USART_H__
#include <rthw.h>
#include <rtthread.h>
#include "cmsis.h"
/* USART - Peripheral instance base addresses */
/** Peripheral USART0 base address */
#define USART0_BASE (0x40064000u)
/** Peripheral USART0 base pointer */
#define USART0 ((LPC_USART_T *)USART0_BASE)
/** Peripheral USART1 base address */
#define USART1_BASE (0x40068000u)
/** Peripheral USART1 base pointer */
#define USART1 ((LPC_USART_T *)USART1_BASE)
/** Peripheral USART2 base address */
#define USART2_BASE (0x4006C000u)
/** Peripheral USART2 base pointer */
#define USART2 ((LPC_USART_T *)USART2_BASE)
/** Array initializer of USART peripheral base addresses */
#define USART_BASE_ADDRS { USART0_BASE, USART1_BASE, USART2_BASE }
/** Array initializer of USART peripheral base pointers */
#define USART_BASE_PTRS { USART0, USART1, USART2 }
/** Interrupt vectors for the USART peripheral type */
#define USART_IRQS { USART0_IRQn, USART1_IRQn, USART2_IRQn }
int rt_hw_usart_init(void);
#endif
|