Commit 8e32b2e8 authored by Jean-Claude BAU's avatar Jean-Claude BAU

Locking reset and stopping PPS generation

These 2 actions : locking_reset() and enable_timing_output(0) must be
done also when the extension is not active.
parent 8773e590
......@@ -200,9 +200,6 @@ static void wr_state_change(struct pp_instance *ppi)
(ppi->state == PPS_MASTER))) {
/* if we are leaving the MASTER or SLAVE state */
wr_reset_process(ppi,WR_ROLE_NONE);
if (ppi->state == PPS_SLAVE)
//* We are leaving SLAVE state
WRH_OPER()->locking_reset(ppi);
}
// Check entering state
......@@ -220,13 +217,21 @@ static void wr_state_change(struct pp_instance *ppi)
break;
}
if ( ppi->state==PPS_SLAVE && ppi->next_state!=PPS_UNCALIBRATED ) {
/* Leave SLAVE state : We must stop the PPS generation */
TOPS(ppi)->enable_timing_output(GLBS(ppi),0);
}
} else {
wr_reset_process(ppi,WR_ROLE_NONE);
}
if (ppi->state == PPS_SLAVE) {
/* We are leaving SLAVE state, so we must reset locking
* This must be done on all cases (extension ACTIVE or NOT) because it may be possible we entered
* in SLAVE state with the extension active and now it can be inactive
*/
WRH_OPER()->locking_reset(ppi);
if ( ppi->next_state!=PPS_UNCALIBRATED ) {
/* Leave SLAVE/UNCALIB states : We must stop the PPS generation */
TOPS(ppi)->enable_timing_output(GLBS(ppi),0);
}
}
}
int wr_ready_for_slave(struct pp_instance *ppi) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment