Has anyone tried to dig into usart.h in buffered usart example.
From my view it looks, that precomiled directives are useless which always gives zero (or I don't understand it) the code below calculates USART0_BAUD_DIV and then subtract from the same formula. It looks to me like x - x, and it always give 0;
Am I worng?

#define USART0_BAUD_DIV(baud) (uint16_t)(USART0_BRCLK / (baud))
///////////////////////////////////////////////////////////////////////////////
// the following are used to calculate the UMOD values at compile time
#define CMOD_0(baud) ((USART0_BRCLK / (baud))-USART0_BAUD_DIV(baud))

Reply via email to