Lines Matching refs:TIME

35     CO_TIME_t *TIME;  in CO_TIME_receive()  local
38 TIME = (CO_TIME_t*)object; /* this is the correct pointer type of the first argument */ in CO_TIME_receive()
39 operState = *TIME->operatingState; in CO_TIME_receive()
42 SET_CANrxNew(TIME->CANrxNew); in CO_TIME_receive()
44 CO_memcpy((uint8_t*)&TIME->Time.ullValue, msg->data, msg->DLC); in CO_TIME_receive()
47 TIME->receiveError = (uint16_t)msg->DLC; in CO_TIME_receive()
53 CO_TIME_t *TIME, in CO_TIME_init() argument
65 if(TIME==NULL || em==NULL || SDO==NULL || operatingState==NULL || in CO_TIME_init()
71 TIME->isConsumer = (COB_ID_TIMEMessage&0x80000000L) ? true : false; in CO_TIME_init()
72 TIME->isProducer = (COB_ID_TIMEMessage&0x40000000L) ? true : false; in CO_TIME_init()
73 TIME->COB_ID = COB_ID_TIMEMessage&0x7FF; // 11 bit ID in CO_TIME_init()
75 TIME->periodTime = TIMECyclePeriod; in CO_TIME_init()
76 TIME->periodTimeoutTime = TIMECyclePeriod / 2 * 3; in CO_TIME_init()
78 if(TIME->periodTimeoutTime < TIMECyclePeriod) in CO_TIME_init()
79 TIME->periodTimeoutTime = 0xFFFFFFFFL; in CO_TIME_init()
81 CLEAR_CANrxNew(TIME->CANrxNew); in CO_TIME_init()
82 TIME->timer = 0; in CO_TIME_init()
83 TIME->receiveError = 0U; in CO_TIME_init()
85 TIME->em = em; in CO_TIME_init()
86 TIME->operatingState = operatingState; in CO_TIME_init()
90 TIME->CANdevRx = CANdevRx; in CO_TIME_init()
91 TIME->CANdevRxIdx = CANdevRxIdx; in CO_TIME_init()
92 if(TIME->isConsumer) in CO_TIME_init()
96 TIME->COB_ID, /* CAN identifier */ in CO_TIME_init()
99 (void*)TIME, /* object passed to receive function */ in CO_TIME_init()
104 TIME->CANdevTx = CANdevTx; in CO_TIME_init()
105 TIME->CANdevTxIdx = CANdevTxIdx; in CO_TIME_init()
106 if(TIME->isProducer) in CO_TIME_init()
107 TIME->TXbuff = CO_CANtxBufferInit( in CO_TIME_init()
110 TIME->COB_ID, /* CAN identifier */ in CO_TIME_init()
120 CO_TIME_t *TIME, in CO_TIME_process() argument
126 …if(*TIME->operatingState == CO_NMT_OPERATIONAL || *TIME->operatingState == CO_NMT_PRE_OPERATIONAL){ in CO_TIME_process()
128 timerNew = TIME->timer + timeDifference_ms; in CO_TIME_process()
129 if(timerNew > TIME->timer) in CO_TIME_process()
130 TIME->timer = timerNew; in CO_TIME_process()
133 if(TIME->CANrxNew){ in CO_TIME_process()
134 TIME->timer = 0; in CO_TIME_process()
136 CLEAR_CANrxNew(TIME->CANrxNew); in CO_TIME_process()
140 if(TIME->isProducer && TIME->periodTime){ in CO_TIME_process()
141 if(TIME->timer >= TIME->periodTime){ in CO_TIME_process()
142 TIME->timer = 0; in CO_TIME_process()
144 … CO_memcpy(TIME->TXbuff->data, (const uint8_t*)&TIME->Time.ullValue, TIME_MSG_LENGTH); in CO_TIME_process()
145 CO_CANsend(TIME->CANdevTx, TIME->TXbuff); in CO_TIME_process()
150 if(TIME->isConsumer && TIME->periodTime && TIME->timer > TIME->periodTimeoutTime in CO_TIME_process()
151 && *TIME->operatingState == CO_NMT_OPERATIONAL) in CO_TIME_process()
152 CO_errorReport(TIME->em, CO_EM_TIME_TIMEOUT, CO_EMC_COMMUNICATION, TIME->timer); in CO_TIME_process()
155 CLEAR_CANrxNew(TIME->CANrxNew); in CO_TIME_process()
159 if(TIME->receiveError != 0U){ in CO_TIME_process()
160 …CO_errorReport(TIME->em, CO_EM_TIME_LENGTH, CO_EMC_TIME_DATA_LENGTH, (uint32_t)TIME->receiveError); in CO_TIME_process()
161 TIME->receiveError = 0U; in CO_TIME_process()