/* * @Author : stark1898y 1658608470@qq.com * @Date : 2024-09-02 18:21:00 * @LastEditors : stark1898y 1658608470@qq.com * @LastEditTime : 2024-09-04 16:34:23 * @FilePath : \JT-DT-YD4N02A_RTT_MRS-4G\libraries\hal_libraries\bmsis\include\debug.h * @Description : * * Copyright (c) 2024 by yzy, All Rights Reserved. */ /********************************** (C) COPYRIGHT ******************************* * File Name : debug.h * Author : WCH * Version : V1.0.0 * Date : 2021/06/06 * Description : This file contains all the functions prototypes for UART * Printf , Delay functions. ********************************************************************************* * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. * Attention: This software (modified or not) and binary are used for * microcontroller manufactured by Nanjing Qinheng Microelectronics. *******************************************************************************/ #ifndef __DEBUG_H #define __DEBUG_H #ifdef __cplusplus extern "C" { #endif #include "stdio.h" #include "ch32v30x.h" /* UART Printf Definition */ #define DEBUG_UART1 1 #define DEBUG_UART2 2 #define DEBUG_UART3 3 /* DEBUG UATR Definition */ #ifndef DEBUG #define DEBUG DEBUG_UART2 #endif /* SDI Printf Definition */ #define SDI_PR_CLOSE 0 #define SDI_PR_OPEN 1 #ifndef SDI_PRINT #define SDI_PRINT SDI_PR_CLOSE #endif void Delay_Init(void); void Delay_Us (uint32_t n); void Delay_Ms (uint32_t n); void USART_Printf_Init(uint32_t baudrate); void SDI_Printf_Enable(void); #ifdef __cplusplus } #endif #endif