S3c2410-
#include <linux/>
#include <linux/>
#include <linux/>
#include <linux/>
#include <linux/>
#include <linux/>
#include <linux/>
#include <linux/>
#include <linux/>
#include <linux/>
#include <linux/>
#include <asm/>
#include <asm/>
#include <asm/>
#include <asm/>
#include <asm/arch/>
#include <asm/arch/>
/* debug macros */
//#undef DEBUG
#define DEBUG
#ifdef DEBUG
#define DPRINTK( x... ) printk( "s3c2410-led: " x)
#else
#define DPRINTK( x... )
#endif
#define DEVICE_NAME "s3c2410 led"
#define LED_TUBE_PHY_START 0x08000110
#define LED_DIG_PHY_START 0x08000100
#define LED_TUBE_IOCTRL 0x11
#define LED_DIG_IOCTRL 0x12
static int ledMajor = 0;
#define LED_MINOR 1
#ifdef CONFIG_DEVFS_FS
static devfs_handle_t devfs_led_dir,devfs_led;
#endif
static u32 s3c2410_led_tube_addr = IDE_BASE + 0x100;
static u32 s3c2410_led_dig_vaddr = IDE_BASE + 0x110;
static int s3c2410_led_ioctl ( struct inode *inode, struct file *filp, unsigned int cmd, unsigned int arg) {
//printk("DOT buffer is %x\n" ,arg>>8 );
switch (cmd){
case LED_DIG_IOCTRL:
return *( volatile unsigned long *)s3c2410_led_dig_vaddr=(arg>>8) |
arg << 16; ; default :
return printk( "your command is not exist" );
}
return 0;
}
static ssize_t s3c241
LED显示程序 来自淘豆网m.daumloan.com转载请标明出处.