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