Ultra-Small, Low-Power, I2C-Compatible, 860-SPS, 16-Bit ADCs With Internal Reference, Oscillator, and Programmable Comparator
Revision 4:7853bced749c, committed 2020-06-19
- Comitter:
- mcm
- Date:
- Fri Jun 19 10:23:27 2020 +0000
- Parent:
- 3:4a9619b441f0
- Commit message:
- A bug was fixed, the device is chosen once it is declared the class on mBed. The driver was tested and it works as expected.
Changed in this revision
ADS111X.cpp | Show annotated file Show diff for this revision Revisions of this file |
ADS111X.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4a9619b441f0 -r 7853bced749c ADS111X.cpp --- 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;
diff -r 4a9619b441f0 -r 7853bced749c ADS111X.h --- a/ADS111X.h Fri Jun 19 10:16:03 2020 +0000 +++ b/ADS111X.h Fri Jun 19 10:23:27 2020 +0000 @@ -359,9 +359,6 @@ /* Thresholds */ ADS111X_thresh_t thresh; /*!< High/Low threshold values */ - - /* Device identification */ - ADS111X_device_t device; /*!< Device. The user MUST identify the device */ } ADS111X_data_t; #endif