Plese use this class with my "i2cmaster" class.

Dependents:   2016_slave_rorikon_2 2016_slave_cylinder 2016_slave_MD 2016_slave_MD_rorikon ... more

Files at this revision

API Documentation at this revision

Comitter:
sgrsn
Date:
Tue Dec 17 07:16:20 2019 +0000
Parent:
2:0dff052266ca
Commit message:
Fix anything

Changed in this revision

i2cslave.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 0dff052266ca -r 6e9ecf7b83e3 i2cslave.cpp
--- a/i2cslave.cpp	Thu Jul 12 10:17:19 2018 +0000
+++ b/i2cslave.cpp	Tue Dec 17 07:16:20 2019 +0000
@@ -87,14 +87,14 @@
 
 void i2cslave::enable_attach() {
     instance = this;
-    //NVIC_SetVector(I2C_IRQn, (uint32_t)(&i2cslave::func_call));   //lpc1114
-    NVIC_SetVector(I2C2_IRQn, (uint32_t)(&i2cslave::func_call));    //lpc1768 (pin28, pin27)
-    NVIC_EnableIRQ(I2C2_IRQn);    
+    NVIC_SetVector(I2C_IRQn, (uint32_t)(&i2cslave::func_call));   //lpc1114
+    //NVIC_SetVector(I2C2_IRQn, (uint32_t)(&i2cslave::func_call));    //lpc1768 (pin28, pin27)
+    NVIC_EnableIRQ(I2C_IRQn);    
 }
 
 void i2cslave::disable_attach() {
-    //NVIC_DisableIRQ(I2C_IRQn);    //lp1114
-    NVIC_DisableIRQ(I2C2_IRQn);    //lpc1768 (pin28, pin27)
+    NVIC_DisableIRQ(I2C_IRQn);    //lp1114
+    //NVIC_DisableIRQ(I2C2_IRQn);    //lpc1768 (pin28, pin27)
 }
 
 }