gatt-service/tx_power: add debug info

This commit is contained in:
Milanka Ringwald 2024-05-28 09:44:05 +02:00 committed by Matthias Ringwald
parent 48553f675e
commit 5a2cbdbac3

View File

@ -43,6 +43,10 @@
* To use with your application, add `#import <tx_power_service.gatt>` to your .gatt file
*/
#ifdef ENABLE_TESTING_SUPPORT
#include <stdio.h>
#endif
#include "btstack_defines.h"
#include "ble/att_db.h"
#include "ble/att_server.h"
@ -107,6 +111,13 @@ void tx_power_service_server_init(int8_t tx_power_level_dBm){
tx_power_level_value_handle = gatt_server_get_value_handle_for_characteristic_with_uuid16(start_handle, end_handle, ORG_BLUETOOTH_CHARACTERISTIC_TX_POWER_LEVEL);
tx_power_level_client_configuration_handle = gatt_server_get_client_configuration_handle_for_characteristic_with_uuid16(start_handle, end_handle, ORG_BLUETOOTH_CHARACTERISTIC_TX_POWER_LEVEL);
#ifdef ENABLE_TESTING_SUPPORT
printf("TXP 0x%02x - 0x%02x \n", start_handle, end_handle);
printf(" tx_power_level 0x%02x \n", tx_power_level_value_handle);
printf(" tx_power_level CCC 0x%02x \n", tx_power_level_client_configuration_handle);
#endif
log_info("TX Power Service Server 0x%02x-0x%02x", start_handle, end_handle);
// register service with ATT Server
tx_power_service_handler.start_handle = start_handle;
tx_power_service_handler.end_handle = end_handle;