44blib.h

来自「这是我学习过程中编写的测试代码」· C头文件 代码 · 共 49 行

H
49
字号
/***********************************************
 * NAME    : 44BLIB.H                          *
 * Version : 17.Apr.00                         *
 ***********************************************/


#ifndef __44blib_h__
#define __44blib_h__

#define NULL 0
#define led_Address 0x6000000

#define EnterPWDN(clkcon) ((void (*)(int))0xc0080e0)(clkcon)
#define min(x1,x2)       ((x1<x2)?x1:x2)
#define max(x1,x2)       ((x1>x2)?x1:x2)
#define distance(x1,x2)   x2-x1          //保证x2>=x1


/*44blib.c*/
void Delay(int time); //Watchdog Timer is used.
void *malloc(unsigned nbyte); 
void free(void *pt);
char   compare(int x,int y);
void Port_Init(void);
void Cache_Flush(void);
void ChangeMemCon(unsigned *pMemCfg);
void Uart_Select(int ch);
void Uart_TxEmpty(int ch);
void Uart_Init(int mclk,int baud);
char Uart_Getch(void);
char Uart_GetKey(void);
int  Uart_GetIntNum(void);
void Uart_SendByte(int data);
void Uart_Printf(char *fmt,...);
void Uart_SendString(char *pt);

void Timer_Start(int divider); //Watchdog Timer is used.
int Timer_Stop(void);          //Watchdog Timer is used.

void Led_Display(unsigned char data);
void __irq keyboard(void);
void ChangePllValue(int m,int p,int s);

#ifdef __cplusplus
}
#endif

#endif /*__44blib_h__*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?