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: main.cpp
- Revision:
- 4:3041a571b7a7
- Parent:
- 3:b76c74783d0d
- Child:
- 5:8e468fef2754
--- a/main.cpp Tue Jan 05 21:32:11 2016 +0000 +++ b/main.cpp Tue Jan 05 22:10:16 2016 +0000 @@ -51,8 +51,10 @@ case IBUS_OTHER_MESSAGE: break; case IBUS_DOORS_LOCKED: + //Goto sleep break; case IBUS_DOORS_UNLOCKED: + //wake up break; case IBUS_NEXT: cdc.display("NEXT"); @@ -88,14 +90,11 @@ rn52.set(RN52_DISCONNECT); break; } - if(rn52.changed()) { - rn52.get(RN52_GETSTATUS, &res); + if(rn52.check_event(&res)) { switch (res.event) { case RN52_CALLER_ID_EVENT: - rn52.get(RN52_CALLER_ID, &res); break; case RN52_TRACK_CHANGE_EVENT: - rn52.get(RN52_TRACK_METADATA, &res); cdc.reset_elapsed_time(); break; case RN52_NO_EVENT: //no event occured, check connection status