From dda2afc516bc2d90075bd84a6fc31912196905d3 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Tue, 10 Feb 2015 21:30:12 +0000 Subject: [PATCH] allow for vendor-specific command to set public bd addr --- chipset-cc256x/bt_control_cc256x.c | 1 + src/bt_control.h | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/chipset-cc256x/bt_control_cc256x.c b/chipset-cc256x/bt_control_cc256x.c index a7f2e717e..2d64b3927 100644 --- a/chipset-cc256x/bt_control_cc256x.c +++ b/chipset-cc256x/bt_control_cc256x.c @@ -274,6 +274,7 @@ static const bt_control_t bt_control_cc256x = { bt_control_cc256x_next_cmd, // next_cmd NULL, // register_for_power_notifications NULL, // hw_error + NULL, // set_bd_addr_cmd }; static const hci_uart_config_t hci_uart_config_cc256x = { diff --git a/src/bt_control.h b/src/bt_control.h index 995cc53a4..b56893a35 100644 --- a/src/bt_control.h +++ b/src/bt_control.h @@ -48,6 +48,7 @@ #define __BT_CONTROL_H #include +#include #if defined __cplusplus extern "C" { @@ -79,6 +80,12 @@ typedef struct { void (*register_for_power_notifications)(void (*cb)(POWER_NOTIFICATION_t event)); void (*hw_error)(void); + + /** support for vendor-specific way to set BD ADDR - cmd has to be stored in hci_cmd_buffer + * @return have command + */ + int (*set_bd_addr_cmd)(void * config, bd_addr_t addr, uint8_t *hci_cmd_buffer); + } bt_control_t; #if defined __cplusplus