diff --git a/TODO.txt b/TODO.txt index 8a5a01a62..d00d2b28c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -17,14 +17,14 @@ NEXT: - DONE: provide per client information: connection, power mode - power handling + - DONE: add wake() to bt_control.h: OFF<->ON<->SLEEP (SLEEP -> OFF is possible) + - check if Bluetooth module can be woken up instantly with BlueTool on both CSR and Broadcom chipsets - check apps for sleep mode compatibility - see what happens on ACTIVATED event - Keyboard - Mouse - WeBe++ - WiiMote example - BTstackManager - - add wake() to bt_control.h: OFF<->ON<->SLEEP (SLEEP -> OFF is possible) - - check if Bluetooth module can be woken up instantly with BlueTool on both CSR and Broadcom chipsets - automate scan enable management - provide new "set discoverable (on/off)" command and store in per client information diff --git a/src/bt_control.h b/src/bt_control.h index 180c638c5..94394d9f6 100644 --- a/src/bt_control.h +++ b/src/bt_control.h @@ -50,7 +50,8 @@ typedef enum { typedef struct { int (*on)(void *config); // <-- turn BT module on and configure int (*off)(void *config); // <-- turn BT module off - int (*sleep)(void *config); // <-- put BT module to sleep - only to be called after ON + int (*sleep)(void *config); // <-- put BT module to sleep - only to be called after ON + int (*wake)(void *config); // <-- wake BT module from sleep - only to be called after SLEEP int (*valid)(void *config); // <-- test if hardware can be supported const char * (*name)(void *config); // <-- return hardware name diff --git a/src/bt_control_iphone.m b/src/bt_control_iphone.m index a190d77e0..f36d9400e 100644 --- a/src/bt_control_iphone.m +++ b/src/bt_control_iphone.m @@ -548,6 +548,10 @@ static int iphone_sleep(void *config){ return iphone_off(config); } +static int iphone_wake(void *config){ + return iphone_on(config); +} + #ifdef IOKIT static void MySleepCallBack( void * refCon, io_service_t service, natural_t messageType, void * messageArgument ) { printf( "messageType %08lx, arg %08lx\n", (long unsigned int)messageType, (long unsigned int)messageArgument); @@ -650,6 +654,7 @@ bt_control_t bt_control_iphone = { iphone_on, iphone_off, iphone_sleep, + iphone_wake, iphone_valid, iphone_name, NULL, // custom init sequence