嵌入式C语言(44blib)

本文详细介绍了基于三星SC2410平台的RAM开发过程中的基础库实现方法,包括延迟函数、内存分配、端口初始化等核心功能,并提供了具体的函数定义与使用说明。

RAM开发中,对于以三星SC2410开发平台,为例子介绍实际的开发。比较重要的是基础库。以下做以介绍:
1,44blib.h
//===========================================================
/***
*    @file : 44blib.h
*
*    44blib.h v1.0 Samsung 44B0X CPU function declara and common define
*
*   @author : daihw 2007/05/14
*/
//===========================================================

#ifndef __44BLIB_H__
#define __44BLIB_H__

#ifdef (__cpluscplus)
extern "C" {
#endif

//define const
#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

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

#define DOWNLOAD_ADDRESS_RAM_STARTADDRESS

/* 8 led control register address */
#define LED8ADDR (*(volatitle unsigned char * ) (0x2140000))
#define LCD   oxFF
#define UART oxFE

/*define libaray function */

void Delay (int time); // Watchdog Timer is used
void DelayMs (int ms_time);
void *malloc (unsigned nbyte);

void free(void *pt);
void Port_Init (void);
void Cache_Flush(void);
void ChangeMemCon(unsigned *pMemCfg);
void Uart_Select(int ch);
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_SendString (char *pt);
void Timer_Start(int divider);
int Timer_Stop(void);
void Led_Display (int LedStatus);
void Beep(int BeepStatus);
void ChangePllValue (int m,int p,int s);
#endif

本源码来自外星人源码论坛 文件夹 PATH 列表 卷序列号码为 0006EE50 EC5F:C44B C:. │ v5目录的结构树.TXT │ www.eenot.net.bat │ ├─开发库 │ ├─Include │ │ │ AndroidUserItem.h │ │ │ AndroidUserManager.h │ │ │ Array.h │ │ │ AvatarControlHead.h │ │ │ BitImage.h │ │ │ BitImageEx.h │ │ │ CameraControl.h │ │ │ CMD_Commom.h │ │ │ CMD_Correspond.h │ │ │ CMD_GameServer.h │ │ │ CMD_LogonServer.h │ │ │ CustomFaceManager.h │ │ │ Custsite.h │ │ │ D2DEngine.h │ │ │ D2DInterface.h │ │ │ D3DDevice.h │ │ │ D3DDirect.h │ │ │ D3DFont.h │ │ │ D3DMusic.h │ │ │ D3DSound.h │ │ │ D3DSoundBuffer.h │ │ │ D3DSoundThread.h │ │ │ D3DSprite.h │ │ │ D3DSurface.h │ │ │ D3DTexture.h │ │ │ DataBaseAide.h │ │ │ Define.h │ │ │ DFontEx.h │ │ │ DirectShowBasic.h │ │ │ DlgBrowser.h │ │ │ DlgGameRule.h │ │ │ DlgInsureCounter.h │ │ │ DlgInsureGame.h │ │ │ DlgMatchAwards.h │ │ │ DlgServerItem.h │ │ │ DlgServerWizard.h │ │ │ DlgTrumpetItem.h │ │ │ DlgVideoClone.h │ │ │ DownLoad.h │ │ │ DownLoadHead.h │ │ │ Expression.h │ │ │ FaceCustomControl.h │ │ │ FaceItemControl.h │ │ │ FaceItemView.h │ │ │ FaceSelectControl.h │ │ │ Flash.ocx │ │ │ FlashControl.h │ │ │ GameEngineHead.h │ │ │ GameFrameApp.h │ │ │ GameFrameAvatar.h │ │ │ GameFrameControl.h │ │ │ GameFrameEngine.h │ │ │ GameFrameHead.h │ │ │ GameFrameMedalView.h │ │ │ GameFramePublicize.h │ │ │ GameFrameService.h │ │ │ GameFrameUserView.h │ │ │ GameFrameView.h │ │ │ GameFrameViewD3D.h │ │ │ GameFrameViewGDI.h │ │ │ GameFrameWnd.h │ │ │ GamePropertyCtrl.h │ │ │ GamePropertyHead.h │ │ │ GamePropertyItem.h │ │ │ GamePropertyManager.h │ │ │ GameServiceHead.h │ │ │ GIFImage.h │ │ │ GlobalServer.h │ │ │ GlobalUnits.h │ │ │ GlobalUserInfo.h │ │ │ HeadTranslate.h │ │ │ IDispimp.h │ │ │ ImageEditorControl.h │ │ │ ImageOle.dll │ │ │ Information.h │ │ │ IPC_GameFrame.h │ │ │ K
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值