[En-Nut-Discussion] serial UART outpuit / printf

Jean Pierre Gauthier jp.gauthier at wanadoo.fr
Wed Oct 5 10:08:11 CEST 2005


 1)verify that 'baud" variable is declared "long int"...
2) The third variable of _ioctl must be a "long int" pointer. 

JP


-----Message d'origine-----
De : en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] De la part de Ing. Joachim
Skale
Envoyé : mercredi 5 octobre 2005 08:27
À : En-Nut Discussion
Objet : [En-Nut-Discussion] serial UART outpuit / printf


hi, 

i have tried to use the UART as a Debug Device, but i cant see anything with
my terminal program hints whats wrong ?

NutRegisterDevice(&devUart0, 0, 0);
	NutRegisterDevice(&devEth0, 0, 0);

	rs232 = fopen("uart0", "w");
	
	_ioctl(_fileno(rs232), UART_SETSPEED, &baud);
	_ioctl(_fileno(rs232), UART_SETSTOPBITS, 1);
	_ioctl(_fileno(rs232), UART_SETDATABITS, 8);
	_ioctl(_fileno(rs232), UART_SETPARITY, 0);
	
	fprintf(rs232,"\nUART open:\n");
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion






More information about the En-Nut-Discussion mailing list