1 /* 2 * Copyright (c) 2006-2023, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2009-01-05 Bernard first version 9 * 2010-03-29 Bernard remove interrupt tx and DMA rx mode. 10 * 2010-03-30 Kyle Ported from STM32 to AVR32. 11 * 2023-10-25 Raman Gopalan UART driver for at32uc3a: Initial version 12 * 2023-11-06 Raman Gopalan Driver abstractions for uc3a and uc3b devices 13 */ 14 15 #ifndef __RT_HW_SERIAL_H__ 16 #define __RT_HW_SERIAL_H__ 17 18 #include <rthw.h> 19 #include <rtthread.h> 20 #include "compiler.h" 21 #include "usart.h" 22 23 #define FOSC0 12000000 24 25 #ifndef BSP_BOARD_MIZAR32B 26 #define FCPU 60000000 27 #define FHSB FCPU 28 #define FPBA FCPU 29 #define FPBB FCPU 30 #else 31 #define FCPU 66000000 32 #define FHSB FCPU 33 #define FPBA 16500000 34 #define FPBB FCPU 35 #endif 36 37 #define UART_RX_BUFFER_SIZE 64 38 #define UART_TX_DMA_NODE_SIZE 4 39 40 #ifdef RT_USING_SERIAL 41 int rt_hw_uart_init(void); 42 #endif 43 44 #endif 45