CANPort provides a higher level interface to a CAN communication channel, and provides timestamping, servicing additional hardware interfaces (optional activity LED, CAN transceiver slope control)
Revision 1:f0b4e47d948d, committed 2019-08-28
- Comitter:
- WiredHome
- Date:
- Wed Aug 28 22:02:49 2019 +0000
- Parent:
- 0:7b81b19d9b10
- Child:
- 2:1824d1421b6d
- Commit message:
- Minor updates based on mbed version.
Changed in this revision
CANPort.cpp | Show annotated file Show diff for this revision Revisions of this file |
CANPort.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/CANPort.cpp Sun Jul 15 15:15:19 2012 +0000 +++ b/CANPort.cpp Wed Aug 28 22:02:49 2019 +0000 @@ -107,7 +107,11 @@ void CANPort::Flash(CANDIR_T tx) { if (activityPin) { *activityPin = (tx == xmt) ? FLASH_TX_LEVEL : FLASH_RX_LEVEL; // dim for transmit, bright for receive + #if (MBED_MAJOR_VERSION >= 5) || (MBED_LIBRARY_VERSION > 127) + activityTimeout.attach(callback(this, &CANPort::Extinguish), FLASH_PERIOD); + #else activityTimeout.attach(this, &CANPort::Extinguish, FLASH_PERIOD); + #endif } }
--- a/CANPort.h Sun Jul 15 15:15:19 2012 +0000 +++ b/CANPort.h Wed Aug 28 22:02:49 2019 +0000 @@ -27,8 +27,6 @@ #define CANPORT_H #include "mbed.h" #include "CANMessage.h" -#include "Utilities.h" // mbed <-> Visual Studio - typedef enum { HIGHSPEED,