ch32x035_usbpd.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /********************************** (C) COPYRIGHT *******************************
  2. * File Name : ch32x035_usbpd.h
  3. * Author : WCH
  4. * Version : V1.0.0
  5. * Date : 2023/04/06
  6. * Description : This file contains all the functions prototypes for the USBPD
  7. * firmware library.
  8. *********************************************************************************
  9. * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
  10. * Attention: This software (modified or not) and binary are used for
  11. * microcontroller manufactured by Nanjing Qinheng Microelectronics.
  12. *******************************************************************************/
  13. #ifndef __CH32X035_USBPD_H
  14. #define __CH32X035_USBPD_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //#include "ch32x035.h"
  19. //#include "ch32x035.h"
  20. #ifndef VOID
  21. #define VOID void
  22. #endif
  23. #ifndef CONST
  24. #define CONST const
  25. #endif
  26. #ifndef BOOL
  27. typedef unsigned char BOOL;
  28. #endif
  29. #ifndef BOOLEAN
  30. typedef unsigned char BOOLEAN;
  31. #endif
  32. #ifndef CHAR
  33. typedef char CHAR;
  34. #endif
  35. #ifndef INT8
  36. //typedef char INT8;
  37. #endif
  38. #ifndef INT16
  39. typedef short INT16;
  40. #endif
  41. #ifndef INT32
  42. typedef long INT32;
  43. #endif
  44. #ifndef UINT8
  45. typedef unsigned char UINT8;
  46. #endif
  47. #ifndef UINT16
  48. typedef unsigned short UINT16;
  49. #endif
  50. #ifndef UINT32
  51. typedef unsigned long UINT32;
  52. #endif
  53. #ifndef UINT8V
  54. typedef unsigned char volatile UINT8V;
  55. #endif
  56. #ifndef UINT16V
  57. typedef unsigned short volatile UINT16V;
  58. #endif
  59. #ifndef UINT32V
  60. typedef unsigned long volatile UINT32V;
  61. #endif
  62. #ifndef PVOID
  63. typedef void *PVOID;
  64. #endif
  65. #ifndef PCHAR
  66. typedef char *PCHAR;
  67. #endif
  68. #ifndef PCHAR
  69. typedef const char *PCCHAR;
  70. #endif
  71. #ifndef PINT8
  72. typedef char *PINT8;
  73. #endif
  74. #ifndef PINT16
  75. typedef short *PINT16;
  76. #endif
  77. #ifndef PINT32
  78. typedef long *PINT32;
  79. #endif
  80. #ifndef PUINT8
  81. typedef unsigned char *PUINT8;
  82. #endif
  83. #ifndef PUINT16
  84. typedef unsigned short *PUINT16;
  85. #endif
  86. #ifndef PUINT32
  87. typedef unsigned long *PUINT32;
  88. #endif
  89. #ifndef PUINT8V
  90. typedef volatile unsigned char *PUINT8V;
  91. #endif
  92. #ifndef PUINT16V
  93. typedef volatile unsigned short *PUINT16V;
  94. #endif
  95. #ifndef PUINT32V
  96. typedef volatile unsigned long *PUINT32V;
  97. #endif
  98. /******************************************************************************/
  99. /* Related macro definitions */
  100. /* Define the return value of the function */
  101. #ifndef SUCCESS
  102. #define SUCCESS 0
  103. #endif
  104. #ifndef FAIL
  105. #define FAIL 0xFF
  106. #endif
  107. #ifndef TRUE
  108. #define TRUE 1
  109. #endif
  110. #ifndef FALSE
  111. #define FALSE 0
  112. #endif
  113. #ifdef __cplusplus
  114. }
  115. #endif
  116. #endif