MPL115A2 library
See http://developer.mbed.org/users/yasuyuki/notebook/MPL115A2/
Revision 1:12912b2da7d9, committed 2014-10-16
- Comitter:
- yasuyuki
- Date:
- Thu Oct 16 16:19:40 2014 +0000
- Parent:
- 0:ae28484ad07d
- Commit message:
- fix
Changed in this revision
MPL115.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MPL115.cpp Sun Oct 12 02:36:30 2014 +0000 +++ b/MPL115.cpp Thu Oct 16 16:19:40 2014 +0000 @@ -48,7 +48,7 @@ { start(); - Tadc.S >>= 6; // to adjust 10 bit + Tadc.Val >>= 6; // to adjust 10 bit return Tadc.S; } @@ -61,8 +61,8 @@ start(); - Padc.S >>= 6; // to adjust 10 bit - Tadc.S >>= 6; // to adjust 10 bit + Padc.Val >>= 6; // to adjust 10 bit + Tadc.Val >>= 6; // to adjust 10 bit c12x2 = (((int)c12.S) * (int)Tadc.S) >> 11; // c12x2 = c12 * Tadc a1 = (int)b1.S + c12x2; // a1 = b1 + c12x2 a1x1 = a1 * (int)Padc.S; // a1x1 = a1 * Padc