Minor changes to support ADMW FWv1.17.75

Revision:
48:5731f1aa2c5a
Parent:
32:52445bef314d
Child:
57:c6275de14bc5
--- a/src/mbed/admw_spi.cpp	Thu Feb 06 00:29:29 2020 +0000
+++ b/src/mbed/admw_spi.cpp	Thu Feb 06 11:01:37 2020 +0000
@@ -1,5 +1,5 @@
 /******************************************************************************
-Copyright 2019 (c) Analog Devices, Inc.
+Copyright 2017 (c) Analog Devices, Inc.
 
 All rights reserved.
 
@@ -106,15 +106,22 @@
     pCtx->_spi->format(ADMW_SPI_FRAME_SIZE, 1);
     
     int rc = 0;
+   
+    *(pCtx->_wakeup) = 1;
+     wait_ms(0.03);
     
     *(pCtx->_cs) = 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");
@@ -140,7 +147,9 @@
     int rc = 0;
     
     SpiContext_t *pCtx = (SpiContext_t*)hDevice;
-    
+
+    *(pCtx->_wakeup) = 1;
+     wait_ms(0.03);    
     *(pCtx->_cs) = 0;
     
     rc  = pCtx->_spi->write((char*)(pTxData), pTxData ? nLength : 0,
@@ -148,7 +157,9 @@
     
     if ((rc < 0) || !bCsHold)
         *(pCtx->_cs) = 1;
-    
+ 
+    *(pCtx->_wakeup) = 0;
+        
     if (rc < 0)
     {
         ADMW_LOG_ERROR("Failed to complete SPI transfer");
@@ -179,4 +190,4 @@
 
 /*!
  * @}
- */
+ */
\ No newline at end of file