您的位置:程序门 -> linux/unix社区 -> 内核及驱动程序研究区



关于led设备驱动的问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


关于led设备驱动的问题[无满意答案结贴,结贴人:kejiec]
发表于:2007-03-26 14:47:57 楼主
各位:
        我现在在做arm-linux开发,涉及到硬件驱动的问题,我的内核是2.6.14.7,gcc是3.4.4.板子是samsung-s3c2410.
使用的是gpio,
i/o   ports     s3c2410a
port   e   control   registers   (gpecon,   gpedat,   and   gpeup)
register   address   r/w   description   reset   value
gpecon   0x56000040   r/w   configure   the   pins   of   port   e   0x0
gpedat   0x56000044   r/w   the   data   register   for   port   e   undefined
gpeup   0x56000048   r/w   pull-up   disable   register   for   port   e   0x0
reserved   0x5600004c   –   reserved   undefined
gpecon   bit   description
gpe15   [31:30]   00   =   input                               01   =   output   (open   drain   output)
10   =   iicsda                                           11   =   reserved
gpe14   [29:28]   00   =   input                               01   =   output   (open   drain   output)
10   =   iicscl                                           11   =   reserved
gpe13   [27:26]   00   =   input                                 01   =   output
10   =   spiclk0               11   =   reserved
gpe12   [25:24]   00   =   input       01   =   output
10   =   spimosi0             11   =   reserved
gpe11   [23:22]   00   =   input                                 01   =   output
10   =   spimiso0             11   =   reserved
gpe10   [21:20]   00   =   input                                 01   =   output
10   =   sddat3             11   =   reserved
gpe9   [19:18]   00   =   input                                 01   =   output
10   =   sddat2               11   =   reserved
gpe8   [17:16]   00   =   input       01   =   output
10   =   sddat1             11   =   reserved
gpe7   [15:14]   00   =   input                                 01   =   output
10   =   sddat0             11   =   reserved
gpe6   [13:12]   00   =   input       01   =   output
10   =   sdcmd                                     11   =   reserved
gpe5   [11:10]   00   =   input                                     01   =   output
10   =   sdclk                                       11   =   reserved
gpe4   [9:8]   00   =   input       01   =   output
10   =   i2ssdo                                     11   =   i2ssdi
gpe3   [7:6]   00   =   input       01   =   output
10   =   i2ssdi                                         11   =   nss0
gpe2   [5:4]   00   =   input       01   =   output
10   =   cdclk               11   =   reserved
gpe1   [3:2]   00   =   input       01   =   output
10   =   i2ssclk               11   =   reserved
gpe0   [1:0]   00   =   input       01   =   output
10   =   i2slrck         11   =   reserved
gpe[15:0]   [15:0]   when   the   port   is   configured   as   input   port,   data   from   external   sources   can   b
read   to   the   corresponding   pin.   when   the   port   is   configured   as   output   port,   d
written   in   this   register   can   be   sent   to   the   corresponding   pin.   when   the   port  
configured   as   a   functional   pin,   undefined   value   will   be   read.
gpeup   bit   description
gpe[15:0]   [15:0]   0:   the   pull-up   function   attached   to   to   the   corresponding   port   pin   is   enabled.
1:   the   pull-up   function   is   disabled.


就是上面的这个io,请高手们帮个忙,非常感谢了

发表于:2007-03-26 19:43:471楼 得分:0
做成一个简单的gpio的驱动。可以用ioctl控制led。
发表于:2007-03-27 14:55:202楼 得分:0
非常感谢你的提醒,你有这方面的源码么,请给我一份

我的email:cj8192079@163.com


快速检索

最新资讯
热门点击