I'm not sure why but I created a char *, write the char to it and it works that way instead of including the hex in the write function; something like write(fd, mychar, 1) instead of write(fd, "0x16",1).
Is this the only way for user program to write bytes to an IO?
--- On Thu 02/09, Gabriel Paubert < firstname.lastname@example.org > wrote:
From: Gabriel Paubert [mailto: email@example.com]
Date: Thu, 9 Feb 2006 23:19:52 +0100
Subject: Re: IO
On Thu, Feb 09, 2006 at 04:37:40PM -0500, Robbie wrote:> > Hi All,> I'm trying to figureout the best way to write a single byte to a serial port I opened with open().> Most of what I've seen use the write() function but when I use this function to write a single hex value to the port it always returned an error.> can anyone offer any advice here?Show us the code!Really, that's the way OSS works.There may be a stupid mistake, but it's impossibleto guess. Seeing the (eventually reduced) source codeis basically the only way to get helpful advices. Gabriel.
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
- Re: IO
- From: Gabriel Paubert <firstname.lastname@example.org>
- Re: IO
- From: Timo Savola <email@example.com>