mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC176X/can_api.c
- Revision:
- 20:4263a77256ae
- Parent:
- 19:398f4c622e1b
- Child:
- 41:e8b66477f5bf
--- a/targets/hal/TARGET_NXP/TARGET_LPC176X/can_api.c Mon Aug 19 18:17:02 2013 +0300 +++ b/targets/hal/TARGET_NXP/TARGET_LPC176X/can_api.c Tue Sep 10 15:14:19 2013 +0300 @@ -164,7 +164,7 @@ obj->dev->MOD &= ~(1); // Enable NVIC if at least 1 interrupt is active - if(LPC_CAN1->IER | LPC_CAN2->IER) { + if(((LPC_SC->PCONP & (1 << 13)) && LPC_CAN1->IER) || ((LPC_SC->PCONP & (1 << 14)) && LPC_CAN2->IER)) { NVIC_SetVector(CAN_IRQn, (uint32_t) &can_irq_n); NVIC_EnableIRQ(CAN_IRQn); }