XilinxProcessorIPLib/drivers/axiethernet/examples/avb/xavb_ptp_packets.c
u16 XAvb_UpdateIntervalDuration(u16   currentIntervalDuration,
                                char logMeanVal) {

  if((logMeanVal >=  XAVB_MIN_SUPPORTED_LOG_MEAN_INTERVAL) &&
     (logMeanVal <=  XAVB_MAX_SUPPORTED_LOG_MEAN_INTERVAL)) {

    return XAvb_ConvertLogMeanToDuration(logMeanVal);

  } else {

    return currentIntervalDuration;

  }
}
/****************************************************************************/
/**
*
* A function to update a PTP message Interval Duration (defined as a
* fraction of 128 seconds). If the endpoint cannot support a requested
* logMeanVal then do not perform the conversion - return the current value.
*
* @param  currentIntervalDuration is the Interval Duration to be updated
* @param  logMeanVal is the base2 value that is to be converted
*
* @return logMeanVal represented as a fraction of 128
*
* @note   This endpoint only supports logMeanValues >=-7 and <=8.
*
*****************************************************************************/
A function to update a PTP message Interval Duration (defined as a
fraction of 128 seconds). If the endpoint cannot support a requested
logMeanVal then do not perform the conversion - return the current value.
A function to update a PTP message Interval Duration ( defined as a fraction of 128 seconds ) . If the endpoint cannot support a requested logMeanVal then do not perform the conversion - return the current value .
u16 XAvb_UpdateIntervalDuration(u16   currentIntervalDuration,
                                char logMeanVal) {
  if((logMeanVal >=  XAVB_MIN_SUPPORTED_LOG_MEAN_INTERVAL) &&
     (logMeanVal <=  XAVB_MAX_SUPPORTED_LOG_MEAN_INTERVAL)) {
    return XAvb_ConvertLogMeanToDuration(logMeanVal);
  } else {
    return currentIntervalDuration;
  }
}
u16 XAvb_UpdateIntervalDuration ( u16 currentIntervalDuration , char logMeanVal ) { if ( ( logMeanVal >= XAVB_MIN_SUPPORTED_LOG_MEAN_INTERVAL ) && ( logMeanVal <= XAVB_MAX_SUPPORTED_LOG_MEAN_INTERVAL ) ) { return XAvb_ConvertLogMeanToDuration ( logMeanVal ) ; } else { return currentIntervalDuration ; } }
A function to update a PTP message Interval Duration (defined as a
fraction of 128 seconds).
A function to update a PTP message Interval Duration ( defined as a fraction of 128 seconds ) .