MityDSP Documentation Index
Initializing PTP daemon

Initialization of the PTP daemon requires the application to provide access to an RFC-1305G core, initialize the lwIP stack, and start the daemon as a thread. The code to do this should look something like the following:

    // allow access to PTP daemon
    \#include <ptpd.h>
    extern int ptpd(Arg apClock, Arg apOffset);

    // create RFC-1305 clock interface
    myClock = new tcDspClk1305G((void *)0xB0000400);

    // initialize lwIP
    lwip_stack_init();

    // start PTP daemon
    attrs = TSK_ATTRS;
    attrs.name = "ptp_daemon";
    attrs.priority = gnPTP_PRIORITY;
    mhPtpHandle = TSK_create((Fxn)ptpd, &attrs, (Arg)myClock, (Arg)NULL);

  
Generated on Mon Apr 22 2013 11:33:38 for MityDSP PTPd Port by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.