练习写驱动,眼高手低什么的
Write a driver which include following features:
provide read/write functions. app can write/read a string(32 bytes length) to/from driver
provide an integer variable storage in memory, and an ioctl function to set the value of
this integer variable.
provide a status display by using /proc filesystem. the proc status should contain
the current string data
the current value of integer variable
You also needs to write the application to test this driver
我的代码在这里:https://github.com/ggarlic/embedded-linux-homework/tree/master/drivers
热切期待各种板砖,我真的觉得写得很不专业,求教诲。
平时自己看驱动教材的时候很明白,轮到自己写的时候就各种不知如何下笔跟犯错。
索性参考ganquan两年前写的第一个驱动,他实现的一个自增器,我改来改去(其实动了大手术,只保留了骨架),还别说,真成了~
再回头一看,也不过如此么,一点都不难,至于憋那么长时间么,还是好记性不如烂笔头。动动手就知道哪不会了。
PS:开发板真是个好玩具,我为什么现在才知道
ggarlic
回复:
十二月 30th, 2011 at 11:58 上午
@太极美术工程狮狮长, 2440不贵吧,学校发的板子。我们自己买的是micro6410,900块
[回复]