equal
deleted
inserted
replaced
172 #endif // GCC |
172 #endif // GCC |
173 /****************************************************************************** |
173 /****************************************************************************** |
174 CAN Interrupt |
174 CAN Interrupt |
175 ******************************************************************************/ |
175 ******************************************************************************/ |
176 { |
176 { |
|
177 unsigned char saved_page = CANPAGE; |
177 unsigned char i; |
178 unsigned char i; |
178 |
179 |
179 if (CANGIT & (1 << CANIT)) // is a messagebox interrupt |
180 if (CANGIT & (1 << CANIT)) // is a messagebox interrupt |
180 { |
181 { |
181 if ((CANSIT1 & TX_INT_MSK) == 0) // is a Rx interrupt |
182 if ((CANSIT1 & TX_INT_MSK) == 0) // is a Rx interrupt |
209 } |
210 } |
210 } |
211 } |
211 } |
212 } |
212 } |
213 } |
213 |
214 |
|
215 CANPAGE = saved_page; |
|
216 |
214 // Bus Off Interrupt Flag |
217 // Bus Off Interrupt Flag |
215 if (CANGIT & (1 << BOFFIT)) // Finaly clear the interrupt status register |
218 if (CANGIT & (1 << BOFFIT)) // Finaly clear the interrupt status register |
216 { |
219 { |
217 CANGIT |= (1 << BOFFIT); // Clear the interrupt flag |
220 CANGIT |= (1 << BOFFIT); // Clear the interrupt flag |
218 } |
221 } |