Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
led.c
Package: KEILUCOS_FOR_LPC2148.rar [view]
Upload User: dsfgsdff
Upload Date: 2022-07-10
Package Size: 319k
Code Size: 2k
Category:
ARM-PowerPC-ColdFire-MIPS
Development Platform:
C/C++
- //#include "LPC214x.H"
- #include "LED.H"
- #include "config.h"
- /**************************************************************/
- /************WWW.MCU666.COM************************************/
- /************QQ:228939191 月亮*********************************/
- #define Led1Pin (1 << 18) // P1.18 is LED1 pin
- #define Led2Pin (1 << 19) // P1.19 is LED1 pin
- #define Led3Pin (1 << 20) // P1.20 is LED1 pin
- #define Led4Pin (1 << 21) // P1.21 is LED1 pin
- #define Led5Pin (1 << 22) // P1.22 is LED1 pin
- #define Led6Pin (1 << 23) // P1.23 is LED1 pin
- #define Led7Pin (1 << 24) // P1.24 is LED1 pin
- #define Led8Pin (1 << 25) // P1.25 is LED1 pin
- #define AlarmPin (1 << 7) // P0.7蜂鸣器
- const int LetTab[]={Led1Pin,Led2Pin,Led3Pin,Led4Pin,Led5Pin,Led6Pin,Led7Pin,Led8Pin};
- /**************************************************************/
- void IO_Int(void)
- {
- IO0DIR|= AlarmPin; //设置P0.7蜂鸣器 输出
- PINSEL0&=0xffff3fff;
- IO1DIR|=Led1Pin|Led2Pin|Led3Pin|Led4Pin|Led5Pin|Led6Pin|Led7Pin|Led8Pin;
- }
- /**************************************************************/
- void LedCS0(int sign)
- {
- if(sign)
- IO1CLR|=Led1Pin;
- else
- IO1SET|=Led1Pin;
- }
- /**************************************************************/
- void LedCS1(int sign)
- {
- if(sign)
- IO1CLR|=Led2Pin;
- else
- IO1SET|=Led2Pin;
- }
- /**************************************************************/
- void LedCS2(int sign)
- {
- if(sign)
- IO1CLR|=Led3Pin;
- else
- IO1SET|=Led3Pin;
- }
- /**************************************************************/
- void LedCS3(int sign)
- {
- if(sign)
- IO0CLR|=AlarmPin;
- else
- IO0SET|=AlarmPin;
- }
- /**************************************************************/
- void LedCS4(int sign)
- {
- if(sign)
- IO1CLR|=Led4Pin|Led5Pin|Led6Pin|Led7Pin|Led8Pin;
- else
- IO1SET|=Led4Pin|Led5Pin|Led6Pin|Led7Pin|Led8Pin;
- }