MAX14690 Library
Dependents: MAX32630HSP3_IMU_HelloWorld MAX32630HSP3_IMU_HelloWorld max32630fthr max4146x_comp ... more
Fork of MAX14690 by
Diff: MAX14720.cpp
- Revision:
- 7:2e9f6e70b34f
- Parent:
- 3:cdd88a3d3d24
- Child:
- 8:2c3f2da51c5d
--- a/MAX14720.cpp Thu Oct 06 17:10:56 2016 +0000 +++ b/MAX14720.cpp Thu Oct 06 21:33:25 2016 +0000 @@ -122,15 +122,15 @@ } if (boostEn == BOOST_ENABLED) { result = writeReg(REG_BOOST_CFG, 0x00); + if (result == MAX14720_ERROR) return result; } - if (result == MAX14720_ERROR) return result; result = writeReg(REG_BOOST_VSET, data); if (result == MAX14720_ERROR) return result; if (boostEn == BOOST_ENABLED) { data = (boostEn << 3) | (boostEMI << 1) | (boostInd); result = writeReg(REG_BOOST_CFG, data); + if (result == MAX14720_ERROR) return result; } - if (result == MAX14720_ERROR) return result; return 0; }