TI_RTOS provides read and write function can only read and write fixed length byte, ask how to read non-fixed length byte;
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
TI_RTOS provides read and write function can only read and write fixed length byte, ask how to read non-fixed length byte;
Hi Alex,
When using the UART2_read, and/or UART2_write functions, you must always use a fixed length. It is, however, possible to use the UART2_ReadReturnMode_PARTIAL when doing a read. This allows you to set a fixed length of 100 bytes, for example, but if only 20 bytes of data are received over UART, then the read operation will return the 20 bytes.
To further understand how the partial return mode works, please refer to the documentation of the UART2 driver in the SDK you are using.