From: paul k. <pau...@xs...> - 2005-02-11 10:39:27
|
Hi there, Thanks for inviting me in! I already gave the 0.10 source code a quick look (just a download from the sources on the website, no CVS access yet) Compiles nicely for me, so no problem there. I agree with Luis his code, it looks nice and usable. But it doesn't compile :'( I spend some time looking for a solution on the internet, and it is a bit of a horror story. First Luis, did you ever get this code working? Right now I assume it could have worked with a 2.4.x kernel. The thing is, the kernel team decided that user space (application) access to /dev/.. should not be done. For that reason most kernel includes are no longer available. Only exception the i2c includes. <linux/i2c.h> etc, but including them results in compile errors. (As Michael noted) The reason is an undefined __user__ macro. Which is part of the kernel teams effort to change the user space behaviour (if I understand correctly). Only found a single note on how to solve it; add #include <linux/compiler.h>. And yes, it compiles nicely. Unfortunatly it doesn't link. The i2c_smbus functions are unresolved. So far I found no solution for this :'( So how does the kernel team wants us to access devices? If I understand it correctly it is supposed to go through dedicated kernel modules like pcf8574 (part of the 2.6 kernel) which are supposed to show up as devices in /sys (sysfs). I am using the Gentoo 2.6.10-r6 kernel and a modprobe pcf8574 results in a /sys/bus/i2c/devices/0-0020 device. This contains (among some other files) a read and write file. Apperently writing to the write file should write data to the connected pcf8574. (I haven't tested it yet) So my question is. Would going for the /sys device be the right solution for lcd4linux? Paul Michael Reinelt wrote: > Hi there, > >>> I am willing to give it a shot, if you are prepared to provide me >>> with some assistance on where to start and how to start. It would be >>> my first effort on writing code on linux. >> >> >> >> No problem, I'm not really a C expert but at least I can help you >> to follow the 'good line'. :) > > > Hey, would be great if someone would work on this part! I can't be of > any help, because I don't have neither an I2C port on my notebook, nor > an I2c Interface. But I like the code from Luis, and I think we've got > a good framework for using HD44780 over two different busses. > > The main reason for the i2c code not working is that most of the code > is #ifdef'ed out because I can't get it to compile. maybe some header > or something is missing.... I don't know. > > Paul, the first thing you'll have to do is getting anonymous CVS > access, so you can work on the latest version of the source. If you > need assistance with CVS or anything other, please let me know. > > > bye, Michael > |