![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Minor changes to support ADMW FWv1.17.75
Diff: src/mbed/admw_spi.cpp
- Revision:
- 60:363fffe5bd22
- Parent:
- 57:c6275de14bc5
- Child:
- 62:a5b88f433406
--- a/src/mbed/admw_spi.cpp Mon Mar 16 09:43:49 2020 +0000 +++ b/src/mbed/admw_spi.cpp Mon Mar 16 09:54:36 2020 +0000 @@ -108,11 +108,9 @@ int rc = 0; *(pCtx->_wakeup) = 1; - + wait_us(31); *(pCtx->_cs) = 0; - - rc = pCtx->_spi->write((char*)(pTxData), pTxData ? nLength : 0, (char*)(pRxData), pRxData ? nLength : 0); @@ -148,16 +146,15 @@ SpiContext_t *pCtx = (SpiContext_t*)hDevice; *(pCtx->_wakeup) = 1; + wait_us(31); *(pCtx->_cs) = 0; - + *(pCtx->_wakeup) = 0; rc = pCtx->_spi->write((char*)(pTxData), pTxData ? nLength : 0, (char*)(pRxData), pRxData ? nLength : 0); if ((rc < 0) || !bCsHold) *(pCtx->_cs) = 1; - - *(pCtx->_wakeup) = 0; - + if (rc < 0) { ADMW_LOG_ERROR("Failed to complete SPI transfer"); @@ -188,4 +185,4 @@ /*! * @} - */ \ No newline at end of file + */