/* Generate 6-axis quaternions from the DMP. In this driver, the 3-axis and 6-axis DMP quaternion features are mutually exclusive.  */
int dmp_enable_6x_lp_quat(unsigned char enable)
/* Generate 6-axis quaternions from the DMP. In this driver, the 3-axis and 6-axis DMP quaternion features are mutually exclusive.  */
int dmp_enable_6x_lp_quat(unsigned char enable)
{
    unsigned char regs[4];
    if (enable) {
        regs[0] = DINA20;
        regs[1] = DINA28;
        regs[2] = DINA30;
        regs[3] = DINA38;
    } else
        memset(regs, 0xA3, 4);
    mpu_write_mem(CFG_8, 4, regs);
    return mpu_reset_fifo();
}