so what you wrote is part c part java? I wrote really similar things in c already, so i have an ok feeling of how that should look. But im not sure about the java side.
 
Mark

 
On 7/9/06, Cliff L. Biffle <cliff@biffle.org> wrote:
On Jul 9, 2006, at 10:50 AM, Mark Yatskar wrote:
> I would be interested in seeing how this is done in java.

I'll see what I can do about packaging it up in a sensible fashion. :-)

If you're wanting more general, vague details, the basic process for
implementing such a function is as follows:
1. Write a Java class (I2CPort, etc.).  Stub out some of its methods
with the 'native' keyword.
2. Generate a C/C++ header file from this class (using javah)
3. Implement the method bodies.  I follow the SWT approach of keeping
the native methods tiny and atomic, and building all actual logic in
Java -- but that's personal preference.

In this case, the C side is a set of simple functions built around
ioctl.

-Cliff L. Biffle




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users