The attached files update the UART peripheral of STM32F4xx and STM32F2xx host MCUs to return number of bytes within a given duration.
The below function definition is used for returning the received bytes and number of bytes over the UART within the given time duration. When the patch is applied correctly, the following code should be updated in /include/wiced_platform.h.
/** Receive data on a UART interface
* @param uart : the UART interface
* @param data : pointer to the buffer which will store incoming data
* @param size : number of bytes to receive
* @param rcvd_size: number of bytes received
* @param timeout : timeout in milisecond
* @return WICED_SUCCESS : on success.
* @return WICED_ERROR : if an error occurred with any step
wiced_result_t wiced_uart_return_received( wiced_uart_t uart, void* data, uint32_t size, uint32_t* rcvd_size, uint32_t timeout );
The attached patch file updates the following files: