mirror of https://github.com/ARMmbed/mbed-os.git
K64F UART Asynch API: Fix synchronization issue
The UART state should be set to busy before starting the transfer Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>pull/3585/head
parent
25096d83e1
commit
018e286ba2
|
@ -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 */
|
/* Start the transfer */
|
||||||
serial_send_asynch(obj);
|
serial_send_asynch(obj);
|
||||||
obj->serial.txstate = kUART_TxBusy;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -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 */
|
/* Start the transfer */
|
||||||
serial_receive_asynch(obj);
|
serial_receive_asynch(obj);
|
||||||
obj->serial.rxstate = kUART_RxBusy;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t serial_tx_active(serial_t *obj)
|
uint8_t serial_tx_active(serial_t *obj)
|
||||||
|
|
Loading…
Reference in New Issue