fsl_flexio_uart.c change proposal

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

fsl_flexio_uart.c change proposal

542 Views
michals
Contributor II

I propose to add the following code to FLEXIO_UART_TransferReceiveNonBlocking() function in fsl_flexio_uart.c (Kinetis SDK). This will make sure that callback function is called in all cases when requested data is received. It makes the code that uses the driver easier to implement. Similar code appears to be already supported/present in fsl_uart.c driver but not in fsl_flexio_uart.c version. 

Here is the diff for fsl_felxio_uart.c

/* Enable FLEXIO_UART RX IRQ if previously enabled. */
FLEXIO_UART_EnableInterrupts(base, kFLEXIO_UART_RxDataRegFullInterruptEnable);

+/* Call user callback since all data are received. */
+if (0 == bytesToReceive)
+{
+if (handle->callback)
+{
+handle->callback(base, handle, kStatus_FLEXIO_UART_RxIdle, handle->userData);
+}
+}
+}
/* Ring buffer not used. */

0 Kudos
2 Replies

441 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Thank you for the patience.

I got the confirmation info form SDK software team, your suggestion is adopted.

Thank you!

You could find the updated FLEXIO_UART_TransferReceiveNonBlocking() function in in fsl_flexio_uart.c  file at next released SDK software package.


Have a great day,
Mike

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

441 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I need double check with SDK software design team about this request.

I will let you know when there with any feedback.

Thank you for the patience.


Have a great day,
Mike

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos