equal
deleted
inserted
replaced
22 |
22 |
23 #include "states.h" |
23 #include "states.h" |
24 #include "def.h" |
24 #include "def.h" |
25 |
25 |
26 #include "nmtSlave.h" |
26 #include "nmtSlave.h" |
27 |
|
28 #ifdef LED_ENABLE |
|
29 #include "led.h" |
|
30 #else |
|
31 #define led_set_state(a,b) |
|
32 #endif |
|
33 |
27 |
34 /* Prototypes for internals functions */ |
28 /* Prototypes for internals functions */ |
35 void switchCommunicationState(CO_Data* d, |
29 void switchCommunicationState(CO_Data* d, |
36 s_state_communication *newCommunicationState); |
30 s_state_communication *newCommunicationState); |
37 |
31 |
74 case NMT: |
68 case NMT: |
75 if (*(d->iam_a_slave)) |
69 if (*(d->iam_a_slave)) |
76 { |
70 { |
77 proceedNMTstateChange(d,m); |
71 proceedNMTstateChange(d,m); |
78 } |
72 } |
79 #ifdef CANOPEN_LSS_ENABLE |
|
80 default: |
|
81 if (m->cob_id.w == 0x7E4 || m->cob_id.w == 0x705) |
|
82 { |
|
83 proceedLSS(d,m); |
|
84 } |
|
85 #endif |
|
86 } |
73 } |
87 } |
74 } |
88 |
75 |
89 #define StartOrStop(CommType, FuncStart, FuncStop) \ |
76 #define StartOrStop(CommType, FuncStart, FuncStop) \ |
90 if(newCommunicationState->CommType && !d->CurrentCommunicationState.CommType){\ |
77 if(newCommunicationState->CommType && !d->CurrentCommunicationState.CommType){\ |
159 break; |
146 break; |
160 |
147 |
161 default: |
148 default: |
162 return 0xFF; |
149 return 0xFF; |
163 }/* end switch case */ |
150 }/* end switch case */ |
164 |
151 |
165 led_set_state(d, newState); |
|
166 } |
152 } |
167 return 0; |
153 return 0; |
168 } |
154 } |
169 |
155 |
170 /*****************************************************************************/ |
156 /*****************************************************************************/ |