1 /********************************** (C) COPYRIGHT ******************************* 2 * File Name : debug.h 3 * Author : WCH 4 * Version : V1.0.0 5 * Date : 2020/04/30 6 * Description : This file contains all the functions prototypes for UART 7 * Printf , Delay functions. 8 * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 * SPDX-License-Identifier: Apache-2.0 10 *******************************************************************************/ 11 #ifndef __DEBUG_H 12 #define __DEBUG_H 13 14 #include "stdio.h" 15 #include "ch32v10x.h" 16 17 /* UART Printf Definition */ 18 #define DEBUG_UART1 1 19 #define DEBUG_UART2 2 20 #define DEBUG_UART3 3 21 22 /* DEBUG UATR Definition */ 23 #define DEBUG DEBUG_UART1 24 //#define DEBUG DEBUG_UART2 25 //#define DEBUG DEBUG_UART3 26 27 void Delay_Init(void); 28 void Delay_Us(uint32_t n); 29 void Delay_Ms(uint32_t n); 30 void USART_Printf_Init(uint32_t baudrate); 31 32 #endif /* __DEBUG_H */ 33