Subject: mor. c help needed
From: Rotary Engine
Date: 1/18/2010, 7:38 AM
To: AAA Put this in the To box



 This goes back to what I recommended about not moving files; 'usb.h' is
 expecting to find a subdirectory 'linux', with two dependent include files,
 one of which is "linux/mod_devicetable.h".

 Include files frequently (almost always) refer to other include files. The
 most generic ones are in '/usr/include' and '/usr/local/include'. From
 there, they start getting OS, version, and product/project specific. Version
 3 of gcc has it's own subfolder under /usr/include, for example.

 Find 'linux/mod_devictable.h' on your file system. Instead of moving it, add
 the directory to your compile statement. Example (<somewhere is the
 directory that has the 'linux' subdirectory containing 'mod_devicetable.h'):

 gcc iUSBDaqexample.c -I /usr/include -I /<somewhere -o example.out.

 This will likely turn up more include file dependencies. Look at the build
 error for the "missing file or include path", keep adding the referenced
 file location to your include path. Eventually, it will all compile but not
 link. Let me know when you get there ;/)


 --Kenny A.
 http://websites.expercraft.com/kennya/

 OK Kenny I get it now. I think.  One xx.h calls another yy.h someplace else
 and that
 one calls another someplace else and so on and so on. How do you guys
 get anything done? This is a nightmare :)

 Does it always look in the previous directory?
 Why don't they put them all in the same directory?

 I redirected the output of locate:
 locate usb.h  locate-usb.h.txt

 Then I converted it to a pdf so I could send it to you.
 Here is the 3 page pdf file attached.
 How do you know what path to choose? usb.h is all over the place.

 I took a guess. Then I ran:
 gcc -I "root/usr/src/linux-headers-2.6.28-17/include/linux/usb.h"
 iUSBDAQsample.c -o usbtest

 The results are shown in the attached jpg.

 Paul Lamar

The files aren't all put in the same dir because that would be a
nightmare in and of itself.  You could end up with a dir with ten
thousand files in it.  When a new package needed to be installed, the
installer would have no idea which files it could overwrite.

I'm away from my linux box..  Is iUSBDAQ part of a standard library,
or is this something you installed/downloaded?


Matt-

I have this device from Hytek Automation that is a data acquisition
system. They provided the  Linux source code on their web site.
The device works with Windows Xp as we used it to monitor Mark's
Suspinski intake manifold pressure. I am trying to get it to
work with Real Time Linux as a first step to a comprehensive
dyno data ac system and EFI control. This attempt is ordinary
Unbuntu 9.04. The distro that comes with RT Linux.

http://www.hytekautomation.com/
http://www.hytekautomation.com/iDAQDownload.html
Mike-at Hytek <myang@hytekautomation.com>

The author of the Linux code was Philip Rayner in the UK
and I am trying to get in touch with him.
Mike Yang, do you have his email address?

It works very well and only cost $90. It is all the
hardware one would need (other than a cheap PC) for
a complete  EFI and powerful data acq system... in theory.
The counter timer could be used for RPM and the I/O
bits for D to A and the 8 channels of A to D to measure
engine parameters. This is why I am spending so much time
on it.

We are just a few C errors away from getting it to work.

Paul Lamar

-- 
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site. http://www.rotaryeng.net
Youtube key word UTUBPLEASE
Copyright 1998-2009 All world wide rights reserved.