From: Brad H. <bh...@bi...> - 2002-04-15 06:23:18
|
Gday all, In my continuing journey of documentation, I got to EVIOCGID, which returns short[4]. Is there any reason why that couldn't be a struct evdev_ident (or input_ident) { uint16_t bustype; uint16_t vendor_id; uint16_t product_id; uint16_t version; }; Similarly, struct ff_replay probably should be { uint16_t length; /* Duration of an effect */ uint16_t delay; /* Time to wait before to start playing an effect */ }; because __u16 is inherently non-portable (refer Linux Device Drivers book, Chapter 10), not to mention being even uglier than the [type]_t notation. No mean feat :) And same principle for the other ff_ structures. The followon from this would be for the internal struct input_dev to contain a struct evdev_ident (or input_ident) instead of the unsigned short idbus; unsigned short idvendor; unsigned short idproduct; unsigned short idversion; Any thoughts? Brad |