分类:
2012-11-08 13:31:59
linux提供的配置2440的引脚的函数
/***s3c2410_gpio_cfgpin()函数**************************************************
* 函数功能: 配置相应的IO口
* 函数原型: void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
pin : 对应的口
function : 配置的值
* 返回值 :
*
* 所需库 :
* 备注 :
****************************************************************/
static void gs_gpio_init(void)
{
s3c2410_gpio_cfgpin(MUTE_SOUND_CTL_PIN,MUTE_SOUND_CTL_OUTP);
}
S3C2440所有用到的宏的定义文件:
[root@localhost linux-2.6.30.4]# find -name regs-gpio.h
./arch/arm/mach-ks8695/include/mach/regs-gpio.h
./arch/arm/plat-s3c64xx/include/plat/regs-gpio.h
./arch/arm/mach-s3c2410/include/mach/regs-gpio.h
[root@localhost linux-2.6.30.4]#
[root@localhost linux-2.6.30.4]# vim arch/arm/mach-s3c2410/include/mach/regs-gpio.h
#define S3C2410_GPG11 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 11)
#define S3C2410_GPG11_INP (0x00 << 22)
#define S3C2410_GPG11_OUTP (0x01 << 22)
#define S3C2410_GPG11_EINT19 (0x02 << 22)
#define S3C2410_GPG11_TCLK1 (0x03 << 22)
#define S3C2443_GPG11_CF_nIREQ (0x03 << 22)
//网上参考的几个关键的宏