add wake() to bt_control.h: OFF<->ON<->SLEEP (SLEEP -> OFF is possible)

This commit is contained in:
matthias.ringwald 2011-01-09 14:53:57 +00:00
parent ca7336dc02
commit 554582176e
3 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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