⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 44blib.h

📁 ARM44B0+sl811(包含所有固件程序和源码)调试通过
💻 H
字号:
/***********************************************
 * NAME    : 44BLIB.H                          *
 * Version : 17.Apr.00                         *
 ***********************************************/
 
#ifndef __44BLIB_H__
#define __44BLIB_H__

#include "..\target\def.h"
 
#define DebugOut Uart_Printf

#define _mini_(x1,x2) ((x1<x2)? x1:x2)
#define _maxi_(x1,x2) ((x1>x2)? x1:x2)

#define ONESEC0 (62500)	//16us resolution, max 1.04 sec
#define ONESEC1 (31250)	//32us resolution, max 2.09 sec
#define ONESEC2 (15625)	//64us resolution, max 4.19 sec
#define ONESEC3 (7812)	//128us resolution, max 8.38 sec
#define ONESEC4 (MCLK/128/(0xff+1))  //@60Mhz, 128*4us resolution, max 32.53 sec

//#define NULL 0

#define EnterPWDN(clkcon) ((void (*)(int))0xe0)(clkcon)
#define DOWNLOAD_ADDRESS _RAM_STARTADDRESS

/*44blib.c*/
void Delay(int time); //Watchdog Timer is used.
void *_malloc_(unsigned nbyte); 
void _free_(void *pt);
int _atoi_(char *str);
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 Uart_GetString(char *string);
int Uart_RxReady(void);
void Timer_Start(int divider); //Watchdog Timer is used.
int Timer_Stop(void);          //Watchdog Timer is used.
//void restart(void);
//void run(void);
void Led_Display(int LedStatus);
void Beep(int BeepStatus);
void ChangePllValue(int m,int p,int s);
char Uart_WaiteKey(unsigned long timeout, int *error_p);
void SoftDelay(int ms);
unsigned char Readkey(void);
void _disable_(void);
void _enable_(void);

void outportb(U8, U32);
void outportw(U16, U32);
void outportl(U32, U32);
U8  inportb(U32);
U16 inportw(U32);
U32 inportl(U32);

//#define	kbhit	Uart_RxReady
//#define	getkey	Uart_GetKey
//#define	getch	Uart_Getch
//#define	getchar	getch
//#define	putch	Uart_SendByte
//#define	putchar	putch
//#define	puts	Uart_SendString

#endif /*__44BLIB_H___*/

⌨️ 快捷键说明

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