欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: 關于驅動中調用內核函數實現gpio寄存器的設置 [打印本頁]

作者: lianyiqun    時間: 2015-7-8 22:06
標題: 關于驅動中調用內核函數實現gpio寄存器的設置
系列函數
系列函數的定義在arch/arm/mach-s3c2410/gpio.c,相關的宏定義在include/asm-arm/arch-s3c2410/regs-gpio.h
(1)void s3c2410_gpio_setpin(unsigned int pin, unsigned intto);
設置相應GPIO口的輸出值,例如:
pin=S3C2410_GPG2,to=0,則設置S3C2410_GPG2的輸出值為0;
pin=S3C2410_GPG2,to=1,則設置S3C2410_GPG2的輸出值為1。
函數定義:
viewplain



(2)unsigned int s3c2410_gpio_getpin(unsigned intpin);
獲取相應GPIO口的值。
函數定義:
viewplain



(3)void s3c2410_gpio_cfgpin(unsigned int pin, unsigned intfunction);
設置相應GPIO口的工作模式,輸入、輸出、中斷等。
函數定義:
viewplain



(4)unsigned int s3c2410_gpio_getcfg(unsigned intpin);
獲取相應GPIO口的工作模式,輸入、輸出、中斷等。
函數定義:
viewplain



(5)voids3c2410_gpio_pullup(unsigned int pin, unsigned intto);
設置相應的GPIO口的電平,例如:
pin=S3C2410_GPG2,to=0,則拉低S3C2410_GPG2,也就是設置S3C2410_GPG2的值為0;
pin=S3C2410_GPG2,to=1,則拉高S3C2410_GPG2,也就是設置S3C2410_GPG2的值為1。
函數定義:
viewplain



(6)unsigned int s3c2410_modify_misccr(unsigned int clear,unsigned int change);
雜項設置,設置寄存器MISCCR,具體看函數定義。
函數定義:
viewplain



(7)int s3c2410_gpio_getirq(unsigned intpin);
獲取相應的GPIO口所對應的中斷號。
函數定義:
viewplain



(8)int s3c2410_gpio_irqfilter(unsigned int pin, unsignedint on, unsigned int config);
中斷過濾配置,具體看函數定義。
函數定義:
viewplain








歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1