[En-Nut-Discussion] uart configuration

ChouK chouk83 at yahoo.fr
Tue Jul 12 11:22:21 CEST 2005


thanks for your answer but what do you mean by "that the lines were 
connected to the D-Sub plug". my card is the ethernut 2.1b and I don't find any sub plug.
look for my jumper configuration on jumperConfig.jpg.
regards,
Nicolas

Arnfinn Aas Eielsen <eielsen at gmail.com> a écrit :
Hello,

I did it like this:

#include 
[...]
int main(void)
{
[...]
NutRegisterDevice(&devUsartAvr0, 0, 0);
freopen("uart0", "r", stdin);
freopen("uart0", "w", stdout);
unsigned long baud = 115200;
_ioctl(_fileno(stdin), UART_SETSPEED, &baud);
_ioctl(_fileno(stdout), UART_SETSPEED, &baud);
fprintf(stdout, "stdout is routed here...\n");
[...]
}

Don't know if you (and I :)) need both the _ioctl() calls...

And I had to check the jumper configurations, so that the lines were 
connected to the D-Sub plug, I found this in the Hardware Manual that 
came along with the card...

Hope it helps...

Arnfinn

På 11. jul. 2005 kl. 18.06 skrev ChouK:

>
> hi,
>
> i try to configure the uart0 of my ethernut card 2.1b as input and 
> output for the rs232 . how can i do this?
>
> Please help me, that made three days that I test and that I don't find 
> the solution.
>
> Thanks for any answers
>
> Nicolas
>
> 
> ---------------------------------
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! 
> Messenger
> Téléchargez le ici !
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>

_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion


		
---------------------------------
 Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
 Téléchargez le ici !  


More information about the En-Nut-Discussion mailing list