SPI-Brigde (capseld), for polling interrupt, it is neccessary to adapt the constructor and the function getInt()

Revision:
1:2a7edc2be6df
Parent:
0:833cb2c6da5d
Child:
2:cb90c271c412
--- a/SC18IS602.cpp	Fri Feb 01 09:40:03 2019 +0000
+++ b/SC18IS602.cpp	Fri Feb 01 15:46:53 2019 +0000
@@ -15,6 +15,9 @@
         cCmd[i] = 0;   
         
     if(getInt())  clearInt();                                                   //
+    
+    
+    getInt_ptr = NULL;
 
 }
 
@@ -140,7 +143,10 @@
 bool SC18IS602::getInt(){
     //printf("Wait for Int...\n");  
     //wait(0.1);
-    if(iINT == 0) return INTERRUPT;
+    if(iINT == 0){
+        return INTERRUPT;
+        //if(getInt_ptr != NULL) return (*getInt_ptr)();// musst be modified
+    }
     if(iINT == 1) return pca->getGPIO1_B7(true);
     if(iINT == 2) return IntPin->read();
     
@@ -285,3 +291,12 @@
 }
 
 
+
+
+//******************************************************************************//
+// musst modified
+//******************************************************************************//
+/*void SC18IS602::setIntFuncPtr( bool (*Int_ptr)(void)){
+    getInt_ptr = Int_ptr;
+    
+}*/