Skip to content

Commit

Permalink
Merge pull request #3558 from NXPmicro/UART_Asynch_Fix
Browse files Browse the repository at this point in the history
K64F UART Asynch API: Fix synchronization issue
  • Loading branch information
adbridge committed Jan 13, 2017
2 parents ccab2c5 + 8c71fbc commit 6cf0c86
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,10 @@ int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx
}
}

obj->serial.txstate = kUART_TxBusy;

/* Start the transfer */
serial_send_asynch(obj);
obj->serial.txstate = kUART_TxBusy;

return 0;
}
Expand Down Expand Up @@ -583,9 +584,10 @@ void serial_rx_asynch(serial_t *obj, void *rx, size_t rx_length, uint8_t rx_widt
}
}

obj->serial.rxstate = kUART_RxBusy;

/* Start the transfer */
serial_receive_asynch(obj);
obj->serial.rxstate = kUART_RxBusy;
}

uint8_t serial_tx_active(serial_t *obj)
Expand Down

0 comments on commit 6cf0c86

Please sign in to comment.