嵌入式C语言(44blib)
来源:互联网 发布:重生之星际淘宝主yoyo 编辑:程序博客网 时间:2024/05/21 11:19
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
- 嵌入式C语言(44blib)
- 嵌入式C语言笔试题(2)
- 嵌入式C语言面试题(二)
- 嵌入式C语言面试题(二)
- 嵌入式SQL应用(C语言)
- 嵌入式之C语言(一)
- 嵌入式为什么选择C语言? (面试)
- 嵌入式C语言实战开发(五)
- 嵌入式C语言编程规范(转载)
- 嵌入式C语言学习(2)
- 嵌入式学习5(C语言基础)
- 嵌入式c语言试题
- 嵌入式C语言点滴
- 嵌入式c语言精华
- 嵌入式C语言笔试
- 嵌入式 C 语言学习体会
- 嵌入式C语言总结
- 嵌入式开发c语言
- C程序设计语言习题—1
- 对ORACLE的外部表的简单介绍(原)
- [zz]法国断网条款2010年正式施行 能否抑制盗版
- JAVA开发者最常去的20个英文网站
- ORACLE 各种PARTITION 的分析(原)
- 嵌入式C语言(44blib)
- .net中Split分割函数的用法
- linux AS4下LVM的使用手册
- Unix/Linux下的Curse库开发指南——第六章 菜单开发及应用(1)
- Myeclipse用CVS包路径问题
- Linux LVM(Logical Volume Manager)
- 扩大虚拟机硬盘空间详解
- ORACLE Change Data Capture 介绍一(原)
- ORACLE Change Data Capture 介绍二(原)