feilipu / avrfreertos

AVR ATmega port of freeRTOS
185 stars 54 forks source link

xSerialPortReInit causes compilation error when __AVR_ATmega2560__ is defined #3

Closed nsmryan closed 8 years ago

nsmryan commented 8 years ago

When compiling FreeRTOS for the ATMega 2560, line 716 caused a compilation error because of references to the undefined symbol ulWantedBaud.

This name is an input to the function xSerialPortInitMinimal, and I think there is a copy-paste issue. Line 716 should read: UBRR1 = (uint16_t)((configCPU_CLOCK_HZ + oldComPortPtr->baudRate * 4UL) / (oldComPortPtr->baudRate * 8UL) - 1); // for 2x mode, using 16 bit avr-gcc capability.

Which replaces wantedBaudRate with the baud rate of the configuration structure.

feilipu commented 8 years ago

Noted, and agreed.