A Blocking Read function for Cy8-042 | Cypress Semiconductor
A Blocking Read function for Cy8-042
I need to use a blocking read function in my project (reading from UART lines with hardware flow control).
But the problem is that as I use the three functions made available in the auto-generated UART_1.h, which are,
UART_1_ReadRxData(); UART_1_GetChar(); UART_1_GetByte(),
the RTS line automatically goes low and a new byte enters the Rx buffer resulting in loss of previous data in Rx Buffer.
I needed help in getting through this problem (of RTS line going low). If rts does not go low, probably, I can read the data already present in the Rx buffer. But if I use any of the read functions mentioned above, the problem remains the same. So how do I read?
Moreover, can I read Rx data without invoking above three functions? Global variables for RxBuffer[BUFFER_SIZE] activate only when Rx buffer size > 4 (which is not my case, I am using the default 4 byte size).