AnsweredAssumed Answered

S32 KEA132, Comment Bug in uart.h (library)

Question asked by richard payne on Jan 1, 2017

The comment below are incorrect, the do not return 1 but return non-zero number such as 0x20, not 1.  Please review and correct comment, thanks. 

 

/*****************************************************************************//*!
*
* @brief check whether tx is complete,i.e. data has been sent out.
*
* @param[in] pUART base of UART port
*
* @return
* 1, Tx complete flag is set
* 0, Tx complete flag is clear
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
static inline uint8_t UART_IsTxComplete(UART_MemMapPtr pUART)
{
return (pUART->S1 & UART_S1_TC_MASK);
}
/*****************************************************************************//*!
*
* @brief check whether Tx buffer is empty
*
* @param[in] pUART base of UART port
*
* @return
* 1, Tx buffer is empty
* 0, Tx buffer is not empty
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
static inline uint8_t UART_IsTxBuffEmpty(UART_MemMapPtr pUART)
{
return (pUART->S1 & UART_S1_TDRE_MASK);
}
/*****************************************************************************//*!
*
* @brief check whether Rx buffer is full, i.e. receive a character
*
* @param[in] pUART base of UART port
*
* @return
* 1, Rx buffer is full
* 0, Rx buffer is not full
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
static inline uint8_t UART_IsRxBuffFull(UART_MemMapPtr pUART)
{
return (pUART->S1 & UART_S1_RDRF_MASK);
}

Outcomes