I am using CCES 2.0.0 to debug ADSP-SC589 EZ-Board. My application is using the UART driver from the CCES lib. It is adi_uart_bf60x.c(in folder CrossCore Embedded Studio 2.0.0\ARM\arm-none-eabi\arm-none-eabi\lib\src\drivers\Source\uart). The code for UART Read looks like:
static ADI_UART_RESULT GetBuffer(
ADI_UART_DEVICE const *pDevice,
ADI_UART_RESULT eResult = ADI_UART_SUCCESS;
/* Wait until a processed buffer is available using
* Semaphore pend. The Semaphore pend will return immediately
* is there is buffer available. */
ADI_OSAL_TIMEOUT_FOREVER) != ADI_OSAL_SUCCESS)
Here ADI_OSAL_TIMEOUT_FOREVER tells UART to wait until it gets some input. While ADI_OSAL_TIMEOUT_NONE is more reasonable in my application. If no data received from UART, UART Rx shall exit immediately.
Is there any way for me to control which timeout to use? ADI_OSAL_TIMEOUT_NONE or ADI_OSAL_TIMEOUT_FOREVER or other values?