Browse Source
The InvenSense icm20608g and icm20689 don't have a FIFO watermark interrupt, but they do have a data ready interrupt and the ability to get the current FIFO count in the same large transfer as the actual FIFO data. So instead of manually checking the FIFO count before every transfer (costs ~ 1-3% cpu) we trust the data ready counts, verify things are in sync after the large transfer (fifo count + fifo contents), and force a manual check before the next transfer if necessary. As a precaution this change lowers the threshold for forcing a manual FIFO count check before the large transfer. Forcing the check if out of sync by 2 (or more) samples makes sense because we always do transfers in multiples of 2 (gyro samples per accel). The other small cosmetic changes are keeping the icm20608g and icm20689 in sync (they're nearly identical).sbg
3 changed files with 35 additions and 23 deletions
Loading…
Reference in new issue