Improve ADXRS450 error detection.

Ensure the POR, PWR, and CST error bits are not set when reading the sample.

Reported by: Jared Russell, Austin Schuh

Change-Id: Ib38178d6b51880480aee86e13c16f9ba89a80693
This commit is contained in:
Peter Johnson
2016-03-03 23:06:00 -08:00
committed by Gerrit Code Review
parent e852547344
commit 5904314a75
2 changed files with 2 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ ADXRS450_Gyro::ADXRS450_Gyro(SPI::Port port) : m_spi(port) {
return;
}
m_spi.InitAccumulator(kSamplePeriod, 0x20000000u, 4, 0x0c000000u, 0x04000000u,
m_spi.InitAccumulator(kSamplePeriod, 0x20000000u, 4, 0x0c00000eu, 0x04000000u,
10u, 16u, true, true);
Calibrate();