[En-Nut-Discussion] Difference between devUart0 & devUart1

ZIP zip357 at centrum.cz
Wed Aug 23 09:30:30 CEST 2006


Hello,

  I'm begginer with ethernut.

  First I worked with examples from ethernut, where is the devDebug0. It 
worked fine. Then I tryied devUart0 it was also OK. But when I started 
to test UART1 a saw devUsartAVR0. I tried the simple program  		

	u_long baud_uart0 = 19200;
	
	init_dio();
	NutRegisterDevice(&DEV_UART0, 0, 0);

	cd_serial1 = fopen(DEV_UART0_NAME, "w");
	
	_ioctl(_fileno(cd_serial1), UART_SETSPEED, &baud_uart0);

	fprintf(cd_serial1, "Hello world!\n");

when I put DEV_UART as devUart0 it works, but when put devUsartAVR0, I 
can't get it working. Something is sending to the serial line, but it's 
not interpreted clearly.

I also wanted to get UART1 working and don't know what to use. Because 
when I tried &devUart1, I got even program crash.

Please help,

Petr




More information about the En-Nut-Discussion mailing list