From: Grahame J. <gb...@th...> - 2005-10-16 07:09:35
|
Hi, I have got this working from my PC however on the gumstix the signals are inverted. On the PC the tx output is sitting at -12V and the signal is pulled high to represent a 0. On the gumstix the tx output is +3.3V and a signal is pulled low to represent a 0. Is there something really simple I am missing here? Should I just invert each bit? Thanks Grahame Jordan Craig Hughes wrote: > Better than setting everything to 0, which is generally not what you > want, you should fetch the structure using tcgetattr() and then just > modify what you want to modify. Check sources/rok-flash/rok-flash.c > at the top for example. > > C > > On Oct 12, 2005, at 12:33 AM, Grahame Jordan wrote: > >> I am setting the control lines as follows and have zeroed the others >> attr.c_iflag = 0; >> attr.c_oflag = 0; >> attr.c_cflag = CLOCAL | CREAD | CS8; >> attr.c_lflag = 0; >> attr.c_cc[ VTIME ] = 0; // timeout in tenths of a second >> attr.c_cc[ VMIN ] = 1; // Only wait for a single char >> >> // Control options >> // 8n1 >> attr.c_cflag &= ~PARENB; >> attr.c_cflag &= ~CSTOPB; >> attr.c_cflag &= ~CSIZE; >> attr.c_cflag |= CS8; >> >> attr.c_cflag |= (CLOCAL | CREAD); >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users |