BUG: AVR32 STDIO driver

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had to add an include of usart_serial.h in stdio_serial.h to pass compilation when using the stdio_serial_init function.

I assume this is a bug either in documentation or in code.

static void helloWorld( void *pvParameters )
{

	/* The parameters are not used.  Prevent compiler warnings. */
	( void ) pvParameters;
	volatile avr32_usart_t  *usart = serialPORT_USART;

	// USART options.
	usart_options_t USART_OPTIONS =
	{
		.baudrate     = 57600,
		.charlength   = 8,
		.paritytype   = USART_NO_PARITY,
		.stopbits     = USART_1_STOPBIT,
		.channelmode  = USART_NORMAL_CHMODE
	};

	USART_OPTIONS.baudrate = ulWantedBaud;
	
	
	
	stdio_serial_init(usart, &USART_OPTIONS);

	/* Cycle for ever */

	for( ;; )
	{



			fprintf(stdout,"Hello world!\n");
						/* Sleep 2 seconds. */
			vTaskDelay( ledDelay );
			
			
	}
}

:?: