Content originally posted in LPCWare by researchinnovation on Sun Dec 09 20:30:36 MST 2012
Quote: graynomad
What's your question?
If put #if CONFIG_UART_ENABLE_INTERRUPT==0,#if CONFIG_UART_ENABLE_TX_INTERRUPT==0, then rest of the part of the code becomes gray shade and this part doesn't get executed while compiling.
That is why I want to know in details, what is happening here.
/* Enable the UART Interrupt */
NVIC_EnableIRQ(UART_IRQn);
#if CONFIG_UART_ENABLE_INTERRUPT==1
#if CONFIG_UART_ENABLE_TX_INTERRUPT==1
LPC_UART->IER = IER_RBR | IER_THRE | IER_RLS; /* Enable UART interrupt */
#else
LPC_UART->IER = IER_RBR | IER_RLS; /* Enable UART interrupt */
#endif
#endif