debug.h 978 B

1234567891011121314151617181920212223242526272829303132
  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. #include "stdio.h"
  14. #include "ch32v10x.h"
  15. /* UART Printf Definition */
  16. #define DEBUG_UART1 1
  17. #define DEBUG_UART2 2
  18. #define DEBUG_UART3 3
  19. /* DEBUG UATR Definition */
  20. #define DEBUG DEBUG_UART1
  21. //#define DEBUG DEBUG_UART2
  22. //#define DEBUG DEBUG_UART3
  23. void Delay_Init(void);
  24. void Delay_Us(uint32_t n);
  25. void Delay_Ms(uint32_t n);
  26. void USART_Printf_Init(uint32_t baudrate);
  27. #endif /* __DEBUG_H */