44blib.h

来自「其于ARM的USB操作,控制芯片为CH375实现操作.以及其他功能.包括AC,串」· C头文件 代码 · 共 56 行

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


#ifndef __44blib_h__
#define __44blib_h__
#include "def.h"
extern "C"
{

#define DebugOut Uart_Printf

#define min(x1,x2) ((x1<x2)? x1:x2)
#define max(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 //modify by zdy

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


/*44blib.c*/
void Delay(int time); //Watchdog Timer is used.

void *malloc(unsigned nbyte); 
void free(void *pt);

void Port_Init(void);
void Cache_Flush(void);
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 Beep( unsigned char stat );	//蜂鸣器鸣叫
void Led_Set(int LedStatus);		//四个LED 点亮/熄灭状态设置

void ChangePllValue(int m,int p,int s);
//void memcpy(unsigned char* targ,unsigned char* src,unsigned int count);

S32 Abs( S32 temp );
}
#endif /*__44blib_h__*/

⌨️ 快捷键说明

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