mbed lib with startup delay fixed for Nucleo401RE

Fork of mbed-src by mbed official

Revision:
41:e8b66477f5bf
Parent:
15:4892fe388435
Child:
212:34d62c0b2af6
--- a/api/CAN.h	Fri Oct 25 13:45:04 2013 +0100
+++ b/api/CAN.h	Fri Oct 25 15:00:04 2013 +0100
@@ -131,12 +131,13 @@
     /** Read a CANMessage from the bus.
      *
      *  @param msg A CANMessage to read to.
+     *  @param handle message filter handle (0 for any message)
      *
      *  @returns
      *    0 if no message arrived,
      *    1 if message arrived
      */
-    int read(CANMessage &msg);
+    int read(CANMessage &msg, int handle = 0);
 
     /** Reset CAN interface.
      *
@@ -169,6 +170,19 @@
      */
     int mode(Mode mode);
     
+    /** Filter out incomming messages
+     *
+     *  @param id the id to filter on
+     *  @param mask the mask applied to the id
+     *  @param format format to filter on (Default CANAny)
+     *  @param handle message filter handle (Optional)
+     *
+     *  @returns
+     *    0 if filter change failed or unsupported,
+     *    new filter handle if successful
+     */
+    int filter(unsigned int id, unsigned int mask, CANFormat format = CANAny, int handle = 0);
+    
     /** Returns number of read errors to detect read overflow errors.
      */
     unsigned char rderror();