Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 60:363fffe5bd22, committed 2020-03-16
- Comitter:
- Vkadaba
- Date:
- Mon Mar 16 09:54:36 2020 +0000
- Parent:
- 59:3d395512b442
- Commit message:
- Added wait_us(31) in admw_spi.cpp when hibernation mode is enabled
Changed in this revision
src/mbed/admw_spi.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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 + */