mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-27 06:35:20 +00:00
use NSLog on iOS
This commit is contained in:
parent
277e27f43f
commit
c92e922855
@ -52,17 +52,17 @@ void platform_iphone_status_handler(BLUETOOTH_STATE state){
|
|||||||
case BLUETOOTH_OFF:
|
case BLUETOOTH_OFF:
|
||||||
SBA_removeStatusBarImage("BTstack");
|
SBA_removeStatusBarImage("BTstack");
|
||||||
SBA_removeStatusBarImage("BTstackActive");
|
SBA_removeStatusBarImage("BTstackActive");
|
||||||
printf("Bluetooth status: OFF\n");
|
NSLog(@"Bluetooth status: OFF");
|
||||||
break;
|
break;
|
||||||
case BLUETOOTH_ON:
|
case BLUETOOTH_ON:
|
||||||
SBA_removeStatusBarImage("BTstackActive");
|
SBA_removeStatusBarImage("BTstackActive");
|
||||||
SBA_addStatusBarImage("BTstack");
|
SBA_addStatusBarImage("BTstack");
|
||||||
printf("Bluetooth status: ON\n");
|
NSLog(@"Bluetooth status: ON");
|
||||||
break;
|
break;
|
||||||
case BLUETOOTH_ACTIVE:
|
case BLUETOOTH_ACTIVE:
|
||||||
SBA_removeStatusBarImage("BTstack");
|
SBA_removeStatusBarImage("BTstack");
|
||||||
SBA_addStatusBarImage("BTstackActive");
|
SBA_addStatusBarImage("BTstackActive");
|
||||||
printf("Bluetooth status: ACTIVE\n");
|
NSLog(@"Bluetooth status: ACTIVE");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -71,13 +71,13 @@ void platform_iphone_status_handler(BLUETOOTH_STATE state){
|
|||||||
|
|
||||||
static void (*window_manager_restart_callback)() = NULL;
|
static void (*window_manager_restart_callback)() = NULL;
|
||||||
static void springBoardDidLaunch(){
|
static void springBoardDidLaunch(){
|
||||||
printf("springBoardDidLaunch!\n");
|
NSLog(@"springBoardDidLaunch!\n");
|
||||||
if (window_manager_restart_callback) {
|
if (window_manager_restart_callback) {
|
||||||
int timer;
|
int timer;
|
||||||
for (timer = 0 ; timer < 10 ; timer++){
|
for (timer = 0 ; timer < 10 ; timer++){
|
||||||
printf("ping SBA %u\n", timer);
|
NSLog(@"ping SBA %u", timer);
|
||||||
if (SBA_available()){
|
if (SBA_available()){
|
||||||
printf("pong from SBA!\n");
|
NSLog(@"pong from SBA!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user