equal
deleted
inserted
replaced
37 */ |
37 */ |
38 |
38 |
39 #include "data.h" |
39 #include "data.h" |
40 #include "sync.h" |
40 #include "sync.h" |
41 #include "canfestival.h" |
41 #include "canfestival.h" |
|
42 #include "sysdep.h" |
42 |
43 |
43 /* Prototypes for internals functions */ |
44 /* Prototypes for internals functions */ |
44 |
45 |
45 /*! |
46 /*! |
46 ** |
47 ** |
90 |
91 |
91 if(d->syncTimer != TIMER_NONE){ |
92 if(d->syncTimer != TIMER_NONE){ |
92 stopSYNC(d); |
93 stopSYNC(d); |
93 } |
94 } |
94 |
95 |
95 if(*d->COB_ID_Sync & 0x40000000 && *d->Sync_Cycle_Period) |
96 if(*d->COB_ID_Sync & UNS32_LE(0x40000000) && *d->Sync_Cycle_Period) |
96 { |
97 { |
97 d->syncTimer = SetAlarm( |
98 d->syncTimer = SetAlarm( |
98 d, |
99 d, |
99 0 /*No id needed*/, |
100 0 /*No id needed*/, |
100 &SyncAlarm, |
101 &SyncAlarm, |
128 { |
129 { |
129 Message m; |
130 Message m; |
130 |
131 |
131 MSG_WAR(0x3001, "sendSYNC ", 0); |
132 MSG_WAR(0x3001, "sendSYNC ", 0); |
132 |
133 |
133 m.cob_id = *d->COB_ID_Sync & 0x1FFFFFFF; |
134 m.cob_id = *(UNS16*)d->COB_ID_Sync; |
134 m.rtr = NOT_A_REQUEST; |
135 m.rtr = NOT_A_REQUEST; |
135 m.len = 0; |
136 m.len = 0; |
136 |
137 |
137 return canSend(d->canHandle,&m); |
138 return canSend(d->canHandle,&m); |
138 } |
139 } |