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
leds.c
Package: linux-2.4.20.tar.gz [view]
Upload User: jlfgdled
Upload Date: 2013-04-10
Package Size: 33168k
Code Size: 1k
Category:
Linux-Unix program
Development Platform:
Unix_Linux
- /*
- * linux/arch/arm/mach-ebsa110/leds.c
- *
- * Copyright (C) 1998 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * EBSA-110 LED control routines. We use the led as follows:
- *
- * - Red - toggles state every 50 timer interrupts
- */
- #include <linux/module.h>
- #include <linux/spinlock.h>
- #include <linux/init.h>
- #include <asm/hardware.h>
- #include <asm/leds.h>
- #include <asm/system.h>
- #include <asm/mach-types.h>
- static spinlock_t leds_lock;
- static void ebsa110_leds_event(led_event_t ledevt)
- {
- unsigned long flags;
- spin_lock_irqsave(&leds_lock, flags);
- switch(ledevt) {
- case led_timer:
- *(volatile unsigned char *)SOFT_BASE ^= 128;
- break;
- default:
- break;
- }
- spin_unlock_irqrestore(&leds_lock, flags);
- }
- static int __init leds_init(void)
- {
- if (machine_is_ebsa110())
- leds_event = ebsa110_leds_event;
- return 0;
- }
- __initcall(leds_init);