Commit 4cb9db21 authored by Maciej Lipinski's avatar Maciej Lipinski Committed by [ACC] Jean-Claude BAU

[WR Timers] Separate defines for each WR state, with well-defined names.

the names correspond to the info provide to Veryx for testing
parent 5d3414a2
......@@ -35,7 +35,7 @@ int wr_calibrated(struct pp_instance *ppi, void *buf, int len)
if (enable)
{
__pp_timeout_set(ppi, PP_TO_EXT_0, wrp->wrStateTimeout);
__pp_timeout_set(ppi, PP_TO_EXT_0, WR_CALIBRATED_TIMEOUT_MS);
e = msg_issue_wrsig(ppi, CALIBRATED);
}
......
......@@ -29,7 +29,7 @@ int wr_locked(struct pp_instance *ppi, void *buf, int len)
}
if (sendmsg) {
__pp_timeout_set(ppi, PP_TO_EXT_0, wrp->wrStateTimeout);
__pp_timeout_set(ppi, PP_TO_EXT_0, WR_LOCKED_TIMEOUT_MS);
e = msg_issue_wrsig(ppi, LOCKED);
}
......
......@@ -32,7 +32,7 @@ int wr_present(struct pp_instance *ppi, void *buf, int len)
}
if (sendmsg) {
__pp_timeout_set(ppi, PP_TO_EXT_0, WR_WRS_PRESENT_TIMEOUT_MS);
__pp_timeout_set(ppi, PP_TO_EXT_0, WR_PRESENT_TIMEOUT_MS);
e = msg_issue_wrsig(ppi, SLAVE_PRESENT);
}
......
......@@ -31,7 +31,7 @@ int wr_resp_calib_req(struct pp_instance *ppi, void *buf, int len)
if (send_pattern)
WRH_OPER()->calib_pattern_enable(ppi, 0, 0, 0);
__pp_timeout_set(ppi, PP_TO_EXT_0,
wrp->wrStateTimeout / 1000);
WR_RESP_CALIB_REQ_TIMEOUT_MS);
}
if (ppi->received_ptp_header.messageType == PPM_SIGNALING) {
......
......@@ -23,12 +23,18 @@
#define FIX_ALPHA_FRACBITS_AS_FLOAT 40.0
#define FIX_ALPHA_TWO_POW_FRACBITS ((double)1.099511627776E12) /* double value returned by pow(2.0,40.0) */
#define WR_DEFAULT_CAL_PERIOD 3000 /* [us] */
#define WR_DEFAULT_STATE_TIMEOUT_MS 300 /* [ms] ML: not really used*/
#define WR_DEFAULT_STATE_TIMEOUT_MS 300 /* [ms] */
#define WR_WRS_PRESENT_TIMEOUT_MS 1000
#define WR_PRESENT_TIMEOUT_MS 1000
#define WR_M_LOCK_TIMEOUT_MS 15000
#define WR_S_LOCK_TIMEOUT_MS 15000
#define WR_LOCKED_TIMEOUT_MS 300
#define WR_CALIBRATION_TIMEOUT_MS 3000
#define WR_RESP_CALIB_REQ_TIMEOUT_MS 3
#define WR_CALIBRATED_TIMEOUT_MS 300
#define WR_DEFAULT_CAL_PERIOD WR_CALIBRATION_TIMEOUT_MS /* [us] */
#define WR_STATE_RETRY 3 /* if WR handhsake fails */
/* White Rabbit package Size */
......
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