ÏÈÊÇÄÚºËÇý¶¯³ÌÐò£º
#include <linux/module.h>//¾ßÌåµÄÍ·ÎļþλÖÃΪ/opt/FriendlyARM/mini2440/linux-2.6.29/include/linux/*.h
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/poll.h>
#include <linux/irq.h>
#include <asm/irq.h>
#include <linux/interrupt.h>
#include <asm/uaccess.h>
#include <mach/regs-gpio.h>//¾ßÌåÍ·ÎļþλÖÃ/opt/FriendlyARM/mini2440/linux-2.6.29/arch/arm/mach-s3c2410/include/mach/*.h
#include <mach/hardware.h>
#include <linux/platform_device.h>
#include <linux/cdev.h>
#include <linux/miscdevice.h>
#include <linux/ioctl.h>
#define DEVICE_NAME "buttons"
struct button_irq_desc {
int irq;
int pin;
int pin_setting;
int number;
char *name;
};
static struct button_irq_desc button_irqs [] = {
{IRQ_EINT8 , S3C2410_GPG0 , S3C2410_GPG0_EINT8 , 0, "KEY0"},
{IRQ_EINT11, S3C2410_GPG3 , S3C2410_GPG3_EINT11 , 1, "KEY1"},
{IRQ_EINT13, S3C2410_GPG5 , S3C2410_GPG5_EINT13 , 2, "KEY2"},
{IRQ_EINT14, S3C2410_GPG6 , S3C2410_GPG6_EINT14 , 3, "KEY3"},
{IRQ_EINT15, S3C2410_GPG7 , S3C2410_GPG7_EINT15 , 4, "KEY4"},
{IRQ_EINT19, S3C2410_GPG11, S3C2410_GPG11_EINT19, 5, "KEY5"},
};
/* ÉÏÃæ³õʼ»¯³ÉÔ±ÀïµÄS3C2410_GPG0_EINT0ÔÚ/opt/FriendlyARM/mini2440/linux-2.6.29/arch /arm/mach-s3c2410/include/mach/regs-gpio.hÖж¨ÒåΪ
#define S3C2410_GPF0_EINT0 (0x02 << 0)£¬¼´ÎªÎÒÃÇÇ°Ãæ˵µÄ“10”ģʽ£¬ÆäËûµÄ¹Ü½ÅÀàËÆ¡£Õâ¸ö³õʼ»¯º¯ÊýµÄ×÷ÓþÍÊǽ«ÈçS3C2410_GPF0_EINT0µÄģʽдÈëµØַΪÈç S3C2410_GPF0µÄ¼Ä´æÆ÷À²¢½«Õâ¸ö¹Ü½ÅÉèÖóÉÖжÏģʽ£¬ÒÔ¼°Ìí¼ÓһЩÆäËûÐÅÏ¢¡£*/
static volatile char key_values [] = {'0', '0', '0', '0', '0', '0'};
//ÉùÃ÷LEDµÄ¹Ü½Å
static unsigned long led_table [] ={ S3C2410_GPB5, S3C2410_GPB6, S3C2410_GPB7, S3C2410_GPB8,};
// ÉùÃ÷LED¹Ü½ÅµÄÅäÖÃÐÅÏ¢£¬´Ë´¦µÄ S3C2410_GPB8_OUTPÓëÉÏÃæµÄS3C2410_GPF0_EINT0ÀàËÆ¡£
static unsigned int led_cfg_table [] = { S3C2410_GPB5_OUTP, S3C
ÈËÎïר·Ã£ººËÐĺڿÍϵÁÐÖ®Ò»Robert Love ÿ¸öÐÇÆÚ£¬ÎÒÃǶ¼²É·ÃÒ»¸öÄں˱àдÉçÇøµÄÈË£¬ËäÈ»ÕâÑùµÄ²É·Ã»áºÜ²àÖؼ¼Êõ£¬µ«ÊÇÎÒÃǵÄÁ¢×ãµãÊÇΪÁËÈÃËùÓÐÈ˶¼ÄܽÓÊÜ¡£±¾ÖÜÎÒÃDzɷÃÁËRobert Love£¬ÏÖÔÚËûÕýÔÚά»¤“¿ÉÇÀÕ¼Äں˔µÄÉý¼¶°üºÍÆäËûһЩÊ¡£ËûʹÓÃLinuxÒѾ7ÄêÁË£¬¶ÔÓÚÏÖÔÚµÄÄÚºËÓкܶ๱Ïס£ËùÓÐÕâЩ×îºóÓÃËû× ......
ÔÚÏÖÐеÄlinux·¢²¼°æ±¾ÖУ¬Èí¼þ°ü¹ÜÀí¹¤¾ßʹÓÃ×î¶àµÄÊÇrpmºÍdpkg,µ«ÊÇÕâÁ½Õ߶¼²»Äܽâ¾öÈí¼þÖ®¼äµÄÒÀÀµ¹Øϵ£¬ËùÒÔÓÖÓÐÁËyumºÍapt£¬yumÆäʵÊǶÔrpmµÄ·â×°£¬¶øaptÊǶÔdkpgµÄ·â×°£¬Á½Õ߶¼ÔÚ·â×°µÄͬʱ£¬ºÜºÃµÄ½â¾öÁËÈí¼þÒÀÀµÎÊÌ⣬ʹÓÃÆðÀ´·Ç³£·½±ã¡£ÏÂÃæÊÇһЩÈí¼þ¹ÜÀí³£ÓõÄÃüÁ
¸üÐÂÈí¼þÁÐ±í£º
......