/* Update internal data when incremental mode is using T3. */
IFX_STATIC void IfxGpt12_IncrEnc_updateFromT3(IfxGpt12_IncrEnc *driver)
/* Update internal data when incremental mode is using T3. */
IFX_STATIC void IfxGpt12_IncrEnc_updateFromT3(IfxGpt12_IncrEnc *driver)
{
    Ifx_GPT12 *gpt12 = driver->module;
    sint32     newPosition;
    driver->direction = gpt12->T3CON.B.T3RDIR ? IfxStdIf_Pos_Dir_backward : IfxStdIf_Pos_Dir_forward;
    newPosition       = gpt12->T3.U;
    newPosition       = (newPosition + driver->offset);
    if (newPosition >= driver->resolution)
    {
        newPosition %= driver->resolution;
    }
    else if (newPosition < 0)
    {
        newPosition = (newPosition + driver->resolution);
    }
    IfxGpt12_IncrEnc_updateSpeedFromT3(driver, newPosition);
    driver->rawPosition = newPosition;
}