canfestival/cf_runtime.c
changeset 1428 e14003eb4d42
parent 1397 21a2ea65cb30
equal deleted inserted replaced
1423:4e33f644f7cf 1428:e14003eb4d42
    12 %(board_decls)s
    12 %(board_decls)s
    13 
    13 
    14 /* Keep track of init level to cleanup correctly */
    14 /* Keep track of init level to cleanup correctly */
    15 static int init_level=0;
    15 static int init_level=0;
    16 /* Retrieve PLC cycle time */
    16 /* Retrieve PLC cycle time */
    17 extern int common_ticktime__;
    17 extern unsigned long long common_ticktime__;
    18 
    18 
    19 /* Per master node slavebootup callbacks. Checks that
    19 /* Per master node slavebootup callbacks. Checks that
    20  * every node have booted before calling Master_post_SlaveBootup */
    20  * every node have booted before calling Master_post_SlaveBootup */
    21 %(slavebootups)s
    21 %(slavebootups)s
    22 
    22 
    32 #define NODE_FORCE_SYNC(nodename) \
    32 #define NODE_FORCE_SYNC(nodename) \
    33     /* Artificially force sync state to 1 so that it is not started */\
    33     /* Artificially force sync state to 1 so that it is not started */\
    34     nodename##_Data.CurrentCommunicationState.csSYNC = -1;\
    34     nodename##_Data.CurrentCommunicationState.csSYNC = -1;\
    35     /* Force sync period to common_ticktime__ so that other node can read it*/\
    35     /* Force sync period to common_ticktime__ so that other node can read it*/\
    36     *nodename##_Data.COB_ID_Sync = 0x40000080;\
    36     *nodename##_Data.COB_ID_Sync = 0x40000080;\
    37     *nodename##_Data.Sync_Cycle_Period = common_ticktime__ * 1000;
    37     *nodename##_Data.Sync_Cycle_Period = common_ticktime__ / 1000;
    38 
    38 
    39 static void DeferedInitAlarm(CO_Data* d, UNS32 id){
    39 static void DeferedInitAlarm(CO_Data* d, UNS32 id){
    40     /* Node will start beeing active on the network after this */
    40     /* Node will start beeing active on the network after this */
    41     setState(d, Initialisation);
    41     setState(d, Initialisation);
    42 }
    42 }