Ultra-Small, Low-Power, I2C-Compatible, 860-SPS, 16-Bit ADCs With Internal Reference, Oscillator, and Programmable Comparator

Revision:
4:7853bced749c
Parent:
3:4a9619b441f0
--- a/ADS111X.cpp	Fri Jun 19 10:16:03 2020 +0000
+++ b/ADS111X.cpp	Fri Jun 19 10:23:27 2020 +0000
@@ -162,7 +162,7 @@
   uint32_t aux      =  I2C_SUCCESS;
 
   /* Only ADS1015 supports this functionality    */
-  if ( myADS111X.device == DEVICE_ADS1115 )
+  if ( _device == DEVICE_ADS1115 )
   {
     /* Read the register to mask it  */
     cmd[0]   =   ADS111X_CONFIG;
@@ -223,8 +223,8 @@
   uint16_t myConfig =  0U;
   uint32_t aux      =  I2C_SUCCESS;
 
-  /* Only ADS1015 supports this functionality    */
-  if ( myADS111X->device == DEVICE_ADS1115 )
+  /* Only ADS1115 supports this functionality    */
+  if ( _device == DEVICE_ADS1115 )
   {
     /* Read the register to mask it  */
     cmd[0]   =   ADS111X_CONFIG;
@@ -281,7 +281,7 @@
   uint32_t aux      =  I2C_SUCCESS;
 
   /* Only ADS1115/ADS1114 supports this functionality    */
-  if ( myPGA.device != DEVICE_ADS1113 )
+  if ( _device != DEVICE_ADS1113 )
   {
     /* Read the register to mask it  */
     cmd[0]   =   ADS111X_CONFIG;
@@ -343,7 +343,7 @@
   uint32_t aux      =  I2C_SUCCESS;
 
   /* Only ADS1115/ADS1114 supports this functionality    */
-  if ( myPGA->device != DEVICE_ADS1113 )
+  if ( _device != DEVICE_ADS1113 )
   {
     /* Read the register to mask it  */
     cmd[0]   =   ADS111X_CONFIG;
@@ -610,7 +610,7 @@
   uint32_t aux      =  I2C_SUCCESS;
 
   /* Only ADS1115/ADS1114 supports this functionality    */
-  if ( myCOMP.device != DEVICE_ADS1113 )
+  if ( _device != DEVICE_ADS1113 )
   {
     /* Read the register to mask it  */
     cmd[0]   =   ADS111X_CONFIG;
@@ -672,7 +672,7 @@
   uint32_t aux      =  I2C_SUCCESS;
 
   /* Only ADS1115/ADS1114 supports this functionality    */
-  if ( myCOMP->device != DEVICE_ADS1113 )
+  if ( _device != DEVICE_ADS1113 )
   {
     /* Read the register to mask it  */
     cmd[0]   =   ADS111X_CONFIG;