📄 嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 linux-unix社区 - 内核及驱动程序研究区 - csdn社区 community_csdn_net.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0166)http://cache.baidu.com/c?word=s3c2410%3B%5F%3Bts%3B%5F%3Bpoll&url=http%3A//topic%2Ecsdn%2Enet/t/20040804/18/3242898%2Ehtml&p=8962d406c8904eae5ab5c4710d1cc4&user=baidu -->
<!--STATUS OK--><HTML><HEAD><TITLE>嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux/Unix社区 / 内核及驱动程序研究区 - CSDN社区 community.csdn.net</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<FORM action=http://www.baidu.com/s>
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<BODY>
<TABLE cellPadding=0 width="100%" bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD width=254><A href="http://www.baidu.com/"><IMG alt=到百度首页
src="嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux-Unix社区 - 内核及驱动程序研究区 - CSDN社区 community_csdn_net.files/logo-kz.gif"
border=0></A></TD>
<TD><FONT color=black size=-1><INPUT
style="FONT-SIZE: 16px; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif"
size=30 name=wd> <INPUT type=submit value=百度一下></FONT> </TD></TR>
<TR>
<TD colSpan=2><FONT color=black size=-1>您的查询字词都已标明如下:<B
style="COLOR: black; BACKGROUND-COLOR: #ffff66"><A
href="http://cache.baidu.com/c?word=s3c2410%3B%5F%3Bts%3B%5F%3Bpoll&url=http%3A//topic%2Ecsdn%2Enet/t/20040804/18/3242898%2Ehtml&p=8962d406c8904eae5ab5c4710d1cc4&user=baidu#baidusnap0">s3c2410_ts_poll</A> </B>
(点击查询词,可以跳到它在文中首次出现的位置) <BR>如果打开速度慢,您可以尝试打开<A
href="http://cache.baidu.com/c?word=s3c2410%3B%5F%3Bts%3B%5F%3Bpoll&url=http%3A//topic%2Ecsdn%2Enet/t/20040804/18/3242898%2Ehtml&p=8962d406c8904eae5ab5c4710d1cc4&user=baidu&im=0"><FONT
style="TEXT-DECORATION: underline" color=blue>无图片的快照</FONT></A>;
如果您想保存该页面,可以<A
onclick="window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title)+'&iu='+encodeURIComponent(location.href)+'&fr=ps#nw=1','_s','scrollbars=no,width=600,height=450,right=75,top=20,status=no,resizable=yes'); return false;"
href="http://cang.baidu.com/do/add" target=_blank><FONT
style="TEXT-DECORATION: underline" color=blue>添加到搜藏</FONT></A><BR><FONT
color=gray>(百度和网页<A
href="http://topic.csdn.net/t/20040804/18/3242898.html"><FONT
color=blue>http://topic.csdn.net/t/20040804/18/3242898.html</FONT></A>的作者无关,不对其内容负责。百度快照谨为网络故障时之索引,不代表被搜索网站的即时页面。)</FONT></FONT>
</TD></TR></TBODY></TABLE></FORM>
<HR>
<META http-equiv=Content-Language content=zh-CN>
<META content=all name=robots>
<META
content="触摸屏 int static endif 输出 ts_ret void return 驱动 count Linux/Unix社区 内核及驱动程序研究区"
name=Keywords><LINK
href="嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux-Unix社区 - 内核及驱动程序研究区 - CSDN社区 community_csdn_net.files/top.css"
type=text/css rel=stylesheet><LINK
href="嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux-Unix社区 - 内核及驱动程序研究区 - CSDN社区 community_csdn_net.files/bottom.css"
type=text/css rel=stylesheet><LINK
href="嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux-Unix社区 - 内核及驱动程序研究区 - CSDN社区 community_csdn_net.files/topic.css"
type=text/css rel=stylesheet>
<DIV id=OutBox><!--Top Begin-->
<DIV id=CHBig1>
<DIV id=CHBigNavBar>
<UL>
<LI><A href="http://www.csdn.net/" rel=external>CSDN首页</A>
<LI><A href="http://news.csdn.net/" rel=external>新 闻</A>
<LI><A href="http://community.csdn.net/" rel=external>社 区</A>
<LI><A href="http://dev.csdn.net/" rel=external>文 档</A>
<LI><A href="http://blog.csdn.net/" rel=external><STRONG>Blog</STRONG></A>
<LI><A href="http://mag.csdn.net/" rel=external>杂 志</A>
<LI><A href="http://dotnet.csdn.net/" rel=external><STRONG>.NET</STRONG></A>
<LI><A href="http://java.csdn.net/" rel=external><B>Java</B></A>
<LI><A href="http://mobile.csdn.net/" rel=external>移动</A>
<LI><A href="http://gamedev.csdn.net/" rel=external>游戏</A>
<LI><A href="http://manager.csdn.net/" rel=external>管理</A>
<LI><A href="http://job.csdn.net/" rel=external>招聘</A>
<LI><A href="http://training.csdn.net/" rel=external>培训</A>
<LI><A href="http://search.csdn.net/" rel=external>搜 索</A>
<LI><A href="http://www.codechina.net/" rel=external>代码</A>
<LI><A href="http://www.dearbook.com.cn/" rel=external>第二书店</A>
<LI><A href="http://www.broadview.com.cn/" rel=external>博文视点</A>
</LI></UL></DIV>
<DIV class=z></DIV></DIV>
<DIV id=CHBig2>
<DIV id=Logo><A href="http://community.csdn.net/" rel=external><IMG alt=CSDN社区
src=""></A> </DIV>
<DIV id=TopAds><A
href="http://www.dearbook.com.cn/subject/yudingagain/index.htm"
rel=external><IMG
src="嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux-Unix社区 - 内核及驱动程序研究区 - CSDN社区 community_csdn_net.files/heding.jpg"></A>
<A
href="http://z.csdn.net/adclick.php?bannerid=66&zoneid=27&source=&dest=http%3A%2F%2Fwww.dearbook.com.cn%2Fsubject%2F2005pingxuan%2Fresshow.htm"
rel=external><IMG src=""></A> </DIV>
<DIV class=z></DIV></DIV><!--Top End-->
<DIV class=z></DIV>
<DIV id=MainNavigation>
<DIV id=MainNavigationRoom><A href="http://community.csdn.net/"
rel=external><SPAN class=CSDNRoom>CSDN社区</SPAN></A> - <A
href="http://community.csdn.net/Expert/ForumsList.asp?typenum=1&roomid=8"
rel=external><STRONG>Linux/Unix社区</STRONG></A> / <A
href="http://community.csdn.net/Expert/ForumList.asp?typenum=1&roomid=803"
rel=external><STRONG>内核及驱动程序研究区</STRONG></A> </DIV>
<DIV id=MainNavigationFunction><A title=功能强大的网络收藏夹,一秒钟操作就可以轻松实现保存带来的价值、分享带来的快乐
href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();"><SPAN
class=FavoriteSpan>收藏此页</SPAN></A> | <A
href="javascript:window.print();"><SPAN
class=PrintSpan>打印</SPAN></A> | <A
href="javascript:window.close();"><SPAN class=CloseSpan>关闭窗口</SPAN></A>
</DIV></DIV>
<DIV class=z></DIV>
<DIV id=ContextBox>
<DIV id=NavigationBox>
<DIV class=Navigation>
<H3>主题关键词</H3>
<DIV class=tag>
<DIV id=LeftTag>
<UL>
<LI>触摸屏
<LI>int
<LI>static
<LI>endif
<LI>输出</LI></UL></DIV>
<DIV id=RightTag>
<UL>
<LI>ts_ret
<LI>void
<LI>return
<LI>驱动
<LI>count</LI></UL></DIV></DIV></DIV>
<DIV class=Navigation>
<H3>得分解答快速导航</H3>
<DIV class=NavigationBox>
<UL>
<LI>帖主:<A
href="http://topic.csdn.net/t/20040804/18/3242898.html#Top">syncrow</A>
<LI><A
href="http://topic.csdn.net/t/20040804/18/3242898.html#Reply_22919178">LinHanLao</A>
<LI><A
href="http://topic.csdn.net/t/20040804/18/3242898.html#Reply_22924837">freasy</A>
<LI><A
href="http://topic.csdn.net/t/20040804/18/3242898.html#Reply_23049157">zhjie374</A>
<LI><A
href="http://topic.csdn.net/t/20040804/18/3242898.html#Reply_23077923">wfwater</A>
</LI></UL></DIV></DIV>
<DIV class=Navigation>
<H3>相关连接</H3>
<DIV class=NavigationBox>
<UL>
<LI><A href="http://blog.csdn.net/" rel=external>CSDN Blog</A>
<LI><A href="http://kb.csdn.net/" rel=external>CSDN 知识库</A>
<LI><A href="http://www.dearbook.com.cn/" rel=external>第二书店</A>
</LI></UL></DIV></DIV>
<DIV class=Navigation>
<H3>广告也精彩</H3>
<DIV class="SkyscraperAD center"></DIV></DIV>
<DIV class=Navigation>
<H3>反馈</H3>
<P>请通过下述方式给我们反馈.</P><IMG alt=反馈
src="嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux-Unix社区 - 内核及驱动程序研究区 - CSDN社区 community_csdn_net.files/feedback.gif">
</DIV>
<DIV class=Navigation>
<P><A
href="http://validator.w3.org/check?uri=http://topic.csdn.net/t/20040804/18/3242898.html"
rel=external><IMG
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 88px; BORDER-BOTTOM: 0px; HEIGHT: 31px"
alt="Valid XHTML 1.0 Strict"
src="嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux-Unix社区 - 内核及驱动程序研究区 - CSDN社区 community_csdn_net.files/valid-xhtml10.png"></A>
<A
href="http://jigsaw.w3.org/css-validator/validator?uri=http://topic.csdn.net/t/20040804/18/3242898.html"
rel=external><IMG
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 88px; BORDER-BOTTOM: 0px; HEIGHT: 31px"
alt="Valid CSS!"
src="嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux-Unix社区 - 内核及驱动程序研究区 - CSDN社区 community_csdn_net.files/vcss.gif"></A>
</P></DIV></DIV>
<DIV id=TopicRegion>
<DIV class=rightbgtop></DIV>
<DIV class=rightbgmid><A name=Top>
<DIV id=TopicTopRegion>
<H1>嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答</H1>
<DIV class=forumperson><SPAN id=TopicAuthorUserName>syncrow</SPAN> (<SPAN
id=TopicAuthorUserNickName>天天</SPAN>) <IMG alt="一级用户 该版得分小于等于100分"
src="嵌入式系统字符驱动程序(应用)问题(初学),请帮忙回答 Linux-Unix社区 - 内核及驱动程序研究区 - CSDN社区 community_csdn_net.files/user1.gif">
<SPAN id=TopicPostDateTime>2004-08-04 18:48:25</SPAN> 在 <A
href="http://community.csdn.net/Expert/ForumsList.asp?typenum=1&roomid=8"
rel=external><STRONG>Linux/Unix社区</STRONG></A> / <A
href="http://community.csdn.net/Expert/ForumList.asp?typenum=1&roomid=803"
rel=external><STRONG>内核及驱动程序研究区</STRONG></A> 提问</DIV></DIV>
<DIV
id=TopicContextRegion><BR>我要做的是把一个字符设备的驱动程序加载到arm开发板上,我已经通过交叉编译,并且也已经把程序下载到开发板上了,自己写了一个很小的测试程序
<BR> main() <BR> { <BR> int
buf[10]; <BR> <BR> int fd =
open("/dev/s3c2410-ts",0); <BR> if(-1==fd) <BR>
printf("Can't open TS!"); <BR> while(1)
<BR> { <BR> read( fd,buf,10); <BR> for(
int i=0; i<10;i++) <BR> printf('buf[%d]=
%d\n",i,buf[i]); <BR> } <BR> }
<BR> 程序运行后,屏幕上提示 Can't open TS!不知道错在哪里?dev/s3c2410-ts
是不是驱动程序里面的#define DEVICE_NAME "s3c2410-ts"?如果不是在哪里可以找到?
<BR> <BR> <BR> 驱动程序:(部分,帖子太长了) <BR>
/* debug macros */ <BR> #undef DEBUG
<BR> #ifdef DEBUG <BR> #define DPRINTK(
x... ) printk("s3c2410-ts: " ##x) <BR>
#else <BR> #define DPRINTK( x... )
<BR> #endif <BR> <BR> #define PEN_UP
0 <BR>
#define PEN_DOWN 1 <BR> #define PEN_FLEETING 2
<BR> #define MAX_TS_BUF 16 /* how many do
we want to buffer */ <BR>
<BR> #undef USE_ASYNC 1 <BR> #define
DEVICE_NAME "s3c2410-ts" <BR> #define TSRAW_MINOR 1
<BR> <BR> typedef struct { <BR>
unsigned int penStatus; /* PEN_UP, PEN_DOWN,
PEN_SAMPLE */ <BR> TS_RET buf[MAX_TS_BUF]; /*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -