From: Charles F. <fo...@te...> - 2004-04-15 23:11:56
|
>>the stik as a master that needs to have device drivers compiled/loaded >>into its kernel to support the specific hardware. Just like scanners or >>digi-cams over a USB bus, if you don't have specific drivers to support >>the device or device type it won't work. USB has endless variations and parameters that can't easily be reduced to a small set, and that's before dealing with HID descriptors. actually, it's worse than that because many USB devices have undocumented proprietary protocols over the USB endpoint-streams. great. (scanners and cameras are often the worst offenders.) it's possible to deal with all that at user level through a generic kernel driver, but the user-level code is almost invariably device-class specific. unlike too many USB devices, i2c chips are usually intended for use in embedded systems, not (just) PCs with Windows, and tend to have proper data sheets. i2c devices by contrast generally accept reads and writes of data at particular offsets, devices have sizes (ie, a particular address range), support sub-addressing or not, and allow 7- or 10-bit addressing. i think that's about it! thus, unlike USB, it's fairly easy to do a standard kernel driver that allows those attributes to be set, and then user-mode programs (drivers) can do the work, and it's possible to have a general purpose program that interacts with many classes of device. (less commonly i2c devices have interrupts that are actually wired up and then it might be necessary to have at least a small kernel driver.) the bus is slow enough that user mode is usually adequate. i've certainly done that under two other operating systems and it's fine. |