How to create separate events for read and write in USART dynamic driver?
I have an application in which I need to receive and write data simultaneously (like in Full Duplex). So in order:
I create an Usart Handle:
app.usartHandle = DRV_USART_Open(DRV_USART_INDEX_2,(DRV_IO_INTENT_READWRITE | DRV_IO_INTENT_NONBLOCKING));
Then I set up a BufferEventHandler:
Then I start a BufferAddRead and a BufferAddWrite:
Now, the question is when I got an Event_Complete in the APP_BufferEventHandler, how to distinguish between a Read complete event and a Write complete event???