hardware.h

来自「阿根廷教授编写的嵌入式internet的实验教程的高质量代码」· C头文件 代码 · 共 45 行

H
45
字号
/******************************************************************************************
   Hardware.h (v1.0)
-------------------------------------------------------------------------------------
This code is from the book:
"Embedded Internet: TCP/IP Basics, Implementation and Applications" by Sergio Scaglia
[Pearson Education, 2006 - ISBN: 0-32-130638-4]

This code is copyright (c) 2006 by Sergio Scaglia, and it may only be used for educational
purposes.  For commercial use, please contact me at sscaglia@intramarket.com.ar
For more information and updates, please visit www.embeddedinternet.org
******************************************************************************************/

#ifndef __hardware_H
#define __hardware_H
#include <inarm.h>

/* Define Hardware  */
#ifdef LPC_E212X

#define OSC_CLOCK_FREQ 14745600  //Crystal frequency
#define ETHERNET
#define SAB			0x000000F0
#define SDB			0x00FF0000
#define IOR			0x00001000
#define IOW			0x00002000
#define LED			0x00000400
#define LEDAPP			0x00000800
#define BUTTON1			!(IO0PIN & 0x00008000)
#define BUTTON2			!(IO0PIN & 0x00000200)

#endif

#ifdef LPC_P212X

#define OSC_CLOCK_FREQ 14745600  //Crystal frequency
#define PPP_LINK
#define LED			0x00002000
#define LEDAPP			0x00001000
#define BUTTON1			!(IO0PIN & 0x00000400)
#define BUTTON2			!(IO0PIN & 0x00000800)

#endif

#endif

⌨️ 快捷键说明

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