pt1588-SH7216 1
IEEE1588v2 Implementation for Renesas SH7216 Demo
|
00001 /* 00002 Copyright (c) 2010-2011 The Regents of the University of California. All rights 00003 reserved. 00004 00005 Permission is hereby granted, without written agreement and without license or 00006 royalty fees, to use, copy, modify, and distribute this software and its 00007 documentation for any purpose, provided that the above copyright notice and the 00008 following two paragraphs appear in all copies of this software. 00009 00010 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR 00011 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF 00012 THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF 00013 CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00014 00015 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 00016 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00017 A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, 00018 AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, 00019 SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 00020 */ 00021 00031 #define LOGANNOUNCEINTERVAL 1 00034 #define LOGSYNCINTERVAL 0 00037 #define LOGMINDELAYREQINTERVAL 0 00040 #define DELAYREQDIV 4 00045 #define ANNOUNCERECEIPTTIMEOUT 3 00048 // DefaultDS (8.2.1.2) 00049 #define TWOSTEPFLAG FALSE 00052 #define DOMAINNUMBER 0 00055 #define CLOCKIDENTITY {0x5C, 0xFF, 0x35, 0xFF, 0xFE, 0x0D, 0x01, 0x4F} 00060 #define NUMBERPORTS 1 00063 #define CLOCKCLASS 248 00067 #define CLOCKACCURACY 0xFE 00071 #define OFFSETSCALEDLOGVARIANCE 0xFFFF 00076 #define PRIORITY1 136 00079 #define PRIORITY2 128 00082 #define SLAVEONLY FALSE 00086 // TimePropertiesDS (8.2.4) 00087 #define CURRENTUTCOFFSET 34 00090 #define CURRENTUTCOFFSETVALID TRUE 00093 #define LEAP59 FALSE 00096 #define LEAP61 FALSE 00099 #define TIMETRACEABLE FALSE 00102 #define FREQUENCYTRACEABLE FALSE 00105 #define PTPTIMESCALE TRUE 00108 #define TIMESOURCE 0xA0 00112 #define FOREIGNMASTERDSSIZE 5 00116 #define DELAY_ASYMMETRY 0 00120 #define MEANPATHDELAY 0x27100000 00125 #define CUTOFF 100000 00133 #define OFFSET_P(x) 0.2*(x) 00137 #define OFFSET_I(x) 0*(x) 00141 #define FREQ_P(x) 0.2*(x) 00145 #define FREQ_I(x) 0*(x) 00150 // Annex D. PTP over UDP over IP. 00151 #define PTP_EVENT_PORT 319 00152 #define PTP_GENERAL_PORT 320 00153 #define DEST_IP {0xE000, 0x0181} 00154 #define TRANSPORTSPECIFIC 0 00157 #define ADDRESSLENGTH