📄 k401lib.h
字号:
/***********************************************
* NAME : K401LIB.H *
* Version : 30.OCT.1999 *
***********************************************/
#ifndef __k401lib_h__
#define __k401lib_h__
#ifdef __cplusplus
extern "C" {
#endif
#define DebugOut Uart_Printf
#define min(x1,x2) ((x1<x2)? x1:x2)
#define max(x1,x2) ((x1>x2)? x1:x2)
#define ONESEC (MCLK/256/16) //5.12us resolution, max 0.3355sec
#define NULL 0
#define EnterPWDN(clkcon) ((void (*)(int))0xf0)(clkcon)
/*k41lib.c*/
void Delay(int time); //Watchdog Timer is used.
void *malloc(unsigned nbyte);
void free(void *pt);
void Port_Stop(void);
void Port_Init(void);
void Uart_TxEmpty(void);
void Uart_Init(int baud);
char Uart_Getch(void);
void Uart_GetString(char *string);
int Uart_GetIntNum(void);
char Uart_GetKey(void);
void Uart_SendByte(int data);
void Uart_Printf(char *fmt,...);
void Uart_SendString(char *pt);
void Timer_Start(void);
int Timer_Stop(void);
void Led_Display(int data);
void Flush_Cache(void);
#ifdef __cplusplus
}
#endif
#endif /*__k41lib_h__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -