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:
- 16:7bb8b161e00b
- Parent:
- 15:82c3cc87bd02
--- a/main.cpp Sun Feb 07 18:24:13 2016 +0000 +++ b/main.cpp Fri Mar 18 20:58:36 2016 +0000 @@ -5,6 +5,15 @@ // Due to power saving functions special firmware required http://mbed.org/users/simon/notebook/interface-powerdown/ +/**** TODO **** +Fix sleep mode +Implement caller ID retreival +Change some public functions to private for both CDC & RN52 +Instead of sending &res to RN52, add public variables for all data to be communicated +rn52.check_event should return event instead of writing to res, (remove if and use switch directly in handle_bt_input + +**** END TODO****/ + #include "mbed.h" #include "PowerControl/PowerControl.h" #include "PowerControl/EthernetPowerControl.h" @@ -12,7 +21,6 @@ #include "CDC.h" #include "RN52.h" - CDC cdc; RN52 rn52; RN52_RESULT res; @@ -63,16 +71,6 @@ rn52.enable(); } } - while(pc.readable()) { - switch (pc.getc()) { - case '1': - printf("enabling\r\n"); - active = 1; - cdc.enable(); - rn52.enable(); - break; - } - } } } @@ -175,7 +173,6 @@ case RN52_CONNECTED: cdc.display("BT ANSLUTEN"); rn52.maxvolume(); - rn52.toggle_play(); break; case RN52_AUDIO_STREAMING: cdc.display(res.title);