Changeset 35 for mbed/trunk/CAN.h

Show
Ignore:
Timestamp:
01/10/12 12:00:50 (4 months ago)
Author:
emilmont
Message:

[10 January 2012] CAN::attach template. CMSIS updates.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • mbed/trunk/CAN.h

    r29 r35  
    228228    */ 
    229229   template<typename T> 
    230    void attach(T* tptr, void (T::*mptr)(void)); 
     230   void attach(T* tptr, void (T::*mptr)(void)) { 
     231        if((mptr != NULL) && (tptr != NULL)) { 
     232            _rxirq.attach(tptr, mptr); 
     233            setup_interrupt(); 
     234        } else { 
     235            remove_interrupt(); 
     236        } 
     237    } 
    231238     
    232239private: