Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: CDC.cpp
- Revision:
- 14:3f4098e94c29
- Parent:
- 13:968af0520530
- Child:
- 15:82c3cc87bd02
--- a/CDC.cpp Sat Jan 30 21:03:52 2016 +0000 +++ b/CDC.cpp Sun Jan 31 20:58:42 2016 +0000 @@ -70,11 +70,14 @@ /** Enables CAN traciever transmit **/ void CDC::enable() { enable_transceiver = 0; //active + sleep_timer.reset(); + sleep_timer.start(); } /** Disables CAN traciever transmit **/ void CDC::disable() { enable_transceiver = 1; //sleep + sleep_timer.stop(); } /** Initializes CDC **/ @@ -112,7 +115,7 @@ /** Handles an incoming (RX) frame **/ IBUS_COMMAND CDC::get_cmd() { - if(can.read(CAN_RxMsg)) { + if(can.read(CAN_RxMsg)) { led2 = !led2; CAN_TxMsg.data[0]++; switch (CAN_RxMsg.id) {