1 
2 
3 #ifndef __CH57x_COMM_H__
4 #define __CH57x_COMM_H__
5 
6 #ifdef __cplusplus
7  extern "C" {
8 #endif
9 
10 
11 #define  NULL           0
12 #define  ALL            0xFFFF
13 
14 #ifndef  SUCCESS
15 #define  SUCCESS        0
16 #define  FAILED         (!SUCCESS)
17 #endif
18 
19 #ifndef  ENABLE
20 #define  DISABLE        0
21 #define  ENABLE         (!DISABLE)
22 #endif
23 
24 #define Debug_UART0        0
25 #define Debug_UART1        1
26 #define Debug_UART2        2
27 #define Debug_UART3        3
28 
29 #ifdef DEBUG
30 #include <stdio.h>
31 #endif
32 
33 #ifndef  FREQ_SYS
34 #define  FREQ_SYS       32000000
35 #endif
36 
37 #if ( CLK_OSC32K == 1 )
38 #define CAB_LSIFQ       32000
39 #else
40 #define CAB_LSIFQ       32768
41 #endif
42 
43 #include <string.h>
44 #include "CH57x_clk.h"
45 #include "CH57x_uart.h"
46 #include "CH57x_gpio.h"
47 #include "CH57x_lcd.h"
48 #include "CH57x_flash.h"
49 #include "CH57x_pwr.h"
50 #include "CH57x_pwm.h"
51 #include "CH57x_adc.h"
52 #include "CH57x_sys.h"
53 #include "CH57x_timer.h"
54 #include "CH57x_spi.h"
55 #include "CH57x_usbdev.h"
56 #include "CH57x_usbhost.h"
57 
58 
59 
60 
61 
62 #define DelayMs(x)      mDelaymS(x)
63 #define DelayUs(x)      mDelayuS(x)
64 
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif  // __CH57x_COMM_H__
71 
72