AnsweredAssumed Answered

Chip_UART_ReadRB() Not Correctly Implemented?

Question asked by Ken Mouratidis on Feb 7, 2018
Latest reply on Feb 21, 2018 by Kerry Zhou

Has anyone successfully used the method Chip_UART_ReadRB() as implemented in LPCOpen 2.1 in uart_17xx_40xx.c? I ask because the code does not look complete. This is what I see in the library source code:

 

/* Copy data from a receive ring buffer */
int Chip_UART_ReadRB(LPC_USART_T *pUART, RINGBUFF_T *pRB, void *data, int bytes)
{
    (void) pUART;

    return RingBuffer_PopMult(pRB, (uint8_t *) data, bytes);
}

 

Two things:

 

1. The "(void)pUART;" does nothing

2. Interrupts should be getting disabled around the call to RingBuffer_PopMul()

 

Thanks,

Ken

Outcomes