(BT) Cleanups

This commit is contained in:
twinaphex 2015-04-02 19:34:36 +02:00
parent 4174fc48a2
commit 64c10c6b49
4 changed files with 6 additions and 5 deletions

View File

@ -23,6 +23,7 @@
#include "btdynamic.h" #include "btdynamic.h"
#define GRAB(A) {#A, (void**)&A##_ptr} #define GRAB(A) {#A, (void**)&A##_ptr}
static struct static struct
{ {
const char* name; const char* name;
@ -107,7 +108,7 @@ bool btstack_try_load(void)
return true; return true;
} }
void btstack_thread_stop() void btstack_thread_stop(void)
{ {
bt_send_cmd_ptr(btstack_set_power_mode_ptr, HCI_POWER_OFF); bt_send_cmd_ptr(btstack_set_power_mode_ptr, HCI_POWER_OFF);
} }
@ -131,7 +132,7 @@ static void btstack_thread_func(void* data)
RARCH_LOG("BTstack: Running\n"); RARCH_LOG("BTstack: Running\n");
CFRunLoopRun(); CFRunLoopRun();
RARCH_LOG("BTstack: Done\n"); RARCH_LOG("BTstack: Done\n");
CFRunLoopSourceInvalidate(btstack_quit_source); CFRunLoopSourceInvalidate(btstack_quit_source);

View File

@ -57,7 +57,7 @@ static bool inquiry_running;
static struct pad_connection g_connections[MAX_USERS]; static struct pad_connection g_connections[MAX_USERS];
static void btpad_connection_send_control(void *data, static void btpad_connection_send_control(void *data,
uint8_t* data_buf, size_t size) uint8_t* data_buf, size_t size)
{ {
struct pad_connection *connection = (struct pad_connection*)data; struct pad_connection *connection = (struct pad_connection*)data;

View File

@ -28,7 +28,7 @@ struct btpad_queue_command
{ {
uint8_t on; uint8_t on;
} btstack_set_power_mode; } btstack_set_power_mode;
struct struct
{ {
uint16_t handle; uint16_t handle;

View File

@ -72,7 +72,7 @@ int bt_close(void);
int bt_send_cmd(const hci_cmd_t *cmd, ...); int bt_send_cmd(const hci_cmd_t *cmd, ...);
/* Register packet handler -- channel only valid /* Register packet handler -- channel only valid
* for L2CAP and RFCOMM packets. for L2CAP and RFCOMM packets.
*/ */
btstack_packet_handler_t bt_register_packet_handler( btstack_packet_handler_t bt_register_packet_handler(
btstack_packet_handler_t handler); btstack_packet_handler_t handler);