mbed-src updated for BMD-200 evaluation board. Just pin numbers are updated.
Dependents: mbed_blinky-bmd-200 bmd-200_accel_demo firstRig
Fork of mbed-src by
Replacement for the "mbed" or "mbed-src" library when using the BMD-200 Evaluation kit. This library only remaps the pin names (i.e. LED1 points to p0.01 instead of p0.18, etc) as used by the BMD-200 Evaluation board (select the nRF51822_mkit platform). All other code is untouched.
Diff: common/CAN.cpp
- Revision:
- 41:e8b66477f5bf
- Parent:
- 15:4892fe388435
- Child:
- 49:a1af374b4197
--- a/common/CAN.cpp Fri Oct 25 13:45:04 2013 +0100 +++ b/common/CAN.cpp Fri Oct 25 15:00:04 2013 +0100 @@ -39,8 +39,8 @@ return can_write(&_can, msg, 0); } -int CAN::read(CANMessage &msg) { - return can_read(&_can, &msg); +int CAN::read(CANMessage &msg, int handle) { + return can_read(&_can, &msg, handle); } void CAN::reset() { @@ -63,19 +63,23 @@ return can_mode(&_can, (CanMode)mode); } - void CAN::attach(void (*fptr)(void), IrqType type) { - if (fptr) { - _irq[(CanIrqType)type].attach(fptr); - can_irq_set(&_can, (CanIrqType)type, 1); - } else { - can_irq_set(&_can, (CanIrqType)type, 0); - } +int CAN::filter(unsigned int id, unsigned int mask, CANFormat format, int handle) { + return can_filter(&_can, id, mask, format, handle); +} + +void CAN::attach(void (*fptr)(void), IrqType type) { + if (fptr) { + _irq[(CanIrqType)type].attach(fptr); + can_irq_set(&_can, (CanIrqType)type, 1); + } else { + can_irq_set(&_can, (CanIrqType)type, 0); } +} - void CAN::_irq_handler(uint32_t id, CanIrqType type) { - CAN *handler = (CAN*)id; - handler->_irq[type].call(); - } +void CAN::_irq_handler(uint32_t id, CanIrqType type) { + CAN *handler = (CAN*)id; + handler->_irq[type].call(); +} } // namespace mbed