📄 hardware.h
字号:
/******************************************************************************************
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -