It would help if you post the code and the invocation of the component on
pastebin.com
what you would want to do is:
- pass the device *name* as an command line argument to the component
- open the device
- use the resulting *file descriptor*
for examples how to pass command line arguments
Hi Gene
You did #include stdio.h I assume...
Yes and unistd.h etc, as I said it compiles fine in both and runs properly from
the command line
I'm thinking that because of the type you used for 'fd', that it may well
be volatile, and out of that functions 'scope' by the time you actually do
the
On Thursday 05 July 2012 08:27:51 Schooner did opine:
Hi Gene
You did #include stdio.h I assume...
Yes and unistd.h etc, as I said it compiles fine in both and runs
properly from the command line
I'm thinking that because of the type you used for 'fd', that it may
well be volatile,
Hi
I have been playing with a C userspace component to pass values from
Linuxcnc to an arduino for display on a pendant LCD.
The code works perfectly from a commandline program but when inserted
into a component, it compiles and runs but each
write(fd, buff, sizeof(buff)) goes to stdout /
On Wednesday 04 July 2012 14:32:06 Schooner did opine:
Hi
I have been playing with a C userspace component to pass values from
Linuxcnc to an arduino for display on a pendant LCD.
The code works perfectly from a commandline program but when inserted
into a component, it compiles and runs