[問題] input node read/write問題

作者: lucy1012 (busy)   2014-12-11 09:20:43
各位大德好,
我在Linux上實作一個input node, 透過下面的方法.
#define DEVICE_ATTR(_name, _mode, _show, _store) \
struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
但遇到一個問題是, 對這個node下read/write之後,
只有第一次下有效, 第二次之後就不會呼叫到Linux kernel裡的show和store方法了...
有從google看到下面的link有一些資訊, 但讀過後還是不太了解意思..
https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt
想請教各位大德 :)
作者: alongalone (沿著孤單的路)   2014-12-11 19:34:00
是沒呼叫到?還是沒顯示結果? 這兩個不太一樣

Links booklink

Contact Us: admin [ a t ] ucptt.com