FE_TER_LOCKOK
if (stv0367ter_lock_algo(state) != FE_TER_LOCKOK)
ter_state->state = FE_TER_LOCKOK;
while (((index) < num_trials) && (ter_state->state != FE_TER_LOCKOK)) {
if ((ter_state->state == FE_TER_LOCKOK) &&
ret_flag = FE_TER_LOCKOK;
} while ((try < 10) && (ret_flag != FE_TER_LOCKOK));
return FE_TER_LOCKOK;