/* * Copyright (c) 2016 Wind River Systems, Inc. * * The right to copy, distribute, modify or otherwise make use * of this software may be licensed only pursuant to the terms * of an applicable Wind River license agreement. */ /* modification history -------------------- 12aug16,myt written */ /* **************************************************************************** * 1 DESCRIPTION **************************************************************************** * PTP configuration */ /* **************************************************************************** * 2 CONFIGURATION **************************************************************************** */ /* **************************************************************************** * 3 INCLUDE FILES **************************************************************************** */ #include "ipptp_config.h" #include "ipptp.h" /* **************************************************************************** * 4 DEFINES **************************************************************************** */ /* **************************************************************************** * 5 TYPES **************************************************************************** */ /* **************************************************************************** * 6 EXTERN PROTOTYPES **************************************************************************** */ /* **************************************************************************** * 7 LOCAL PROTOTYPES **************************************************************************** */ /* **************************************************************************** * 8 DATA **************************************************************************** */ /* *=========================================================================== * SYSVAR CONFIGURATION *=========================================================================== */ /* **************************************************************************** * 9 PUBLIC FUNCTIONS **************************************************************************** */ /***************************************************************************** * * usrPtpBoundaryClock1Init - init PTP Boundary clock 4 * * This function initializes PTP ordinary clock 4 * * RETURNS: OK * * ERRNO: none */ STATUS usrPtpBoundaryClock4Init (void) { #ifdef IPPTP_802_1AS_PROFILE if (ptpdAdd(PTP_BOUNDARY_CLK4_IF_NAME, 2, 1, 1, PTP_BOUNDARY_CLK4_ONE_STEP_MODE, PTP_BOUNDARY_CLK4_PRIORITY, PTP_BOUNDARY_CLK4_PDELAY_REQ_INTERVAL,1) == 0) #elif defined(IPPTP_DEFAULT_PROFILE) if (ptpdAdd(PTP_BOUNDARY_CLK4_IF_NAME, PTP_BOUNDARY_CLK4_TRANSPORT_LAYER, 1, PTP_BOUNDARY_CLK4_DELAY_MECHANISM, PTP_BOUNDARY_CLK4_ONE_STEP_MODE, PTP_BOUNDARY_CLK4_PRIORITY, PTP_BOUNDARY_CLK4_PDELAY_REQ_INTERVAL,0) == 0) #else #error Must select a profile of XXXX #endif { ptpdSetDebugLevel(PTP_BOUNDARY_CLK4_IF_NAME, PTP_BOUNDARY_CLK4_DEBUG_LEVEL); ptpdStartClock(PTP_BOUNDARY_CLK4_IF_NAME); } return OK; } /* **************************************************************************** * END OF FILE **************************************************************************** */