50 lines
1.2 KiB
C
50 lines
1.2 KiB
C
|
/* <20><><EFBFBD><EFBFBD> */
|
|||
|
/* <20>ṩprintf<74>ӳ<EFBFBD><D3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD> */
|
|||
|
|
|||
|
#ifndef __DEBUG_H__
|
|||
|
#define __DEBUG_H__
|
|||
|
|
|||
|
//<2F><><EFBFBD>庯<EFBFBD><E5BAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|||
|
#ifndef SUCCESS
|
|||
|
#define SUCCESS 0
|
|||
|
#endif
|
|||
|
#ifndef FAIL
|
|||
|
#define FAIL 0xFF
|
|||
|
#endif
|
|||
|
|
|||
|
//<2F><><EFBFBD>嶨ʱ<E5B6A8><CAB1><EFBFBD><EFBFBD>ʼ
|
|||
|
#ifndef START
|
|||
|
#define START 1
|
|||
|
#endif
|
|||
|
#ifndef STOP
|
|||
|
#define STOP 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef DE_PRINTF
|
|||
|
#define DE_PRINTF 0
|
|||
|
#endif
|
|||
|
#define FREQ_SYS 12000000 //ϵͳ<CFB5><CDB3>Ƶ12MHz
|
|||
|
#ifndef UART0_BUAD
|
|||
|
#define UART0_BUAD 9600
|
|||
|
#define UART1_BUAD 9600
|
|||
|
#endif
|
|||
|
|
|||
|
void CfgFsys( ); //CH554ʱ<34><CAB1>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
void L0_nop_1us(void);
|
|||
|
|
|||
|
void delayus( UINT16 n ); // <20><>uSΪ<53><CEAA>λ<EFBFBD><CEBB>ʱ
|
|||
|
void delayms( UINT16 n ); // <20><>mSΪ<53><CEAA>λ<EFBFBD><CEBB>ʱ
|
|||
|
|
|||
|
void CH554UART0Alter(); //CH554<35><34><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ӳ<EFBFBD>䵽P0.2/P0.3
|
|||
|
void mInitSTDIO( ); //T1<54><31>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ʷ<EFBFBD><CAB7><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
UINT8 CH554UART0RcvByte( ); //CH554 UART0<54><30>ѯ<EFBFBD><D1AF>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>
|
|||
|
void CH554UART0SendByte(UINT8 SendDat); //CH554UART0<54><30><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>
|
|||
|
|
|||
|
void UART1Setup( ); //
|
|||
|
UINT8 CH554UART1RcvByte( ); //CH554 UART1<54><31>ѯ<EFBFBD><D1AF>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>
|
|||
|
void CH554UART1SendByte(UINT8 SendDat); //CH554UART1<54><31><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>
|
|||
|
|
|||
|
void WDTModeSelect(UINT8 mode); //CH554<35><34><EFBFBD>Ź<EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD>
|
|||
|
void WDTFeed(UINT8 tim); //CH554<35><34><EFBFBD>Ź<EFBFBD>ι<EFBFBD><CEB9>
|
|||
|
#endif
|