debug.h 866 B

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