l3gd20: disable the FIFO

the FIFO was not gaining us anything, and was adding latency. If we
use the FIFO we'd need to do multiple SPI transfers to ensure it is
drained
This commit is contained in:
Andrew Tridgell 2013-08-02 20:25:26 +10:00 committed by Lorenz Meier
parent c84cdf2ff6
commit 83189a85da
1 changed files with 5 additions and 1 deletions

View File

@ -342,7 +342,11 @@ L3GD20::init()
write_reg(ADDR_CTRL_REG5, 0);
write_reg(ADDR_CTRL_REG5, REG5_FIFO_ENABLE); /* disable wake-on-interrupt */
write_reg(ADDR_FIFO_CTRL_REG, FIFO_CTRL_STREAM_MODE); /* Enable FIFO, old data is overwritten */
/* disable FIFO. This makes things simpler and ensures we
* aren't getting stale data. It means we must run the hrt
* callback fast enough to not miss data. */
write_reg(ADDR_FIFO_CTRL_REG, FIFO_CTRL_BYPASS_MODE);
set_range(2000); /* default to 2000dps */
set_samplerate(0); /* max sample rate */