Fixed few wrong conditions.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14947 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-10-25 12:23:32 +00:00
parent 888847198d
commit 87b54b56c3
1 changed files with 3 additions and 3 deletions

View File

@ -570,7 +570,7 @@ msg_t spiIgnore(SPIDriver *spip, size_t n) {
osalSysLock();
msg = spiStartIgnoreI(spip, n);
if (msg != MSG_OK) {
if (msg == MSG_OK) {
msg = spiSynchronizeS(spip, TIME_INFINITE);
}
@ -639,7 +639,7 @@ msg_t spiSend(SPIDriver *spip, size_t n, const void *txbuf) {
osalSysLock();
msg = spiStartSendI(spip, n, txbuf);
if (msg != MSG_OK) {
if (msg == MSG_OK) {
msg = spiSynchronizeS(spip, TIME_INFINITE);
}
@ -672,7 +672,7 @@ msg_t spiReceive(SPIDriver *spip, size_t n, void *rxbuf) {
osalSysLock();
msg = spiStartReceiveI(spip, n, rxbuf);
if (msg != MSG_OK) {
if (msg == MSG_OK) {
msg = spiSynchronizeS(spip, TIME_INFINITE);
}