imu/invensense/icm20608g: minor improvements and potential fixes

- perform full sensor signal path reset and wait for max time (100 ms)
 - issue full sensor reset on any error
 - always read FIFO count before transfersj
 - only allocate drdy perf counter if GPIO is available
This commit is contained in:
Daniel Agar
2020-06-05 21:28:37 -04:00
parent 626895eadc
commit ff3b040d3c
4 changed files with 182 additions and 209 deletions
@@ -166,9 +166,9 @@ public:
* contents of _value are written into *expected.
* @return If desired is written into _value then true is returned
*/
inline bool compare_exchange(T *expected, T num)
inline bool compare_exchange(T *expected, T desired)
{
return __atomic_compare_exchange(&_value, expected, num, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
return __atomic_compare_exchange(&_value, expected, &desired, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
}
private: