[En-Nut-Discussion] Ethernut3.1 RS232 DTR pin
Thiago A. Corrêa
thiago.correa at gmail.com
Thu Dec 17 13:04:40 CET 2009
On Thu, Dec 17, 2009 at 6:56 AM, Paul Govers <egnite at paulgovers.com> wrote:
> Hello Thiago,
>
> The ethernut board (http://www.ethernut.de/en/hardware/enut3/index.html) iam
> using has a fully wired RS232 connector. i checked the schematics and the
> DTR pin is connected. i have also tried to connect DTR to the DSR on the
> RS232 side of my heating system but this does not help. i think that the
> heating system has not implement the DSR pin/functionality :-(
Ok, I will take a look at the driver to see if I can find it implemented.
> your other suggestion to set the DTR pin, with code that would looks
> like(where UART_DTR can be a other name)
> unsigned long on = 1;
> _ioctl(_fileno(cd.cd_rs232), UART_DTR, &on);
> is maby the solution, i will try this piece of code
>
Looked up my code, it is actually:
long temp = 0;
temp = UART_DTRENABLED;
if ( data->settings->flowcontrol != 2 ) // Not RTS/CTS
temp |= UART_RTSENABLED; // Keep RTS line up just like the PC does.
_ioctl(_fileno(data->serialPort), UART_SETSTATUS, &temp);
So, the constant you are looking for is UART_DTRENABLED from UART_SETSTATUS.
Kind Regards,
Thiago A. Correa
More information about the En-Nut-Discussion
mailing list