From edf70fbf9fb59e0262b97f431ce5b8088edbf755 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 21 Jun 2021 11:35:31 +0200 Subject: [PATCH] example: use #define for constants instead of const uint8_t to fix build --- example/gatt_counter.c | 6 +++--- example/gatt_streamer_server.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example/gatt_counter.c b/example/gatt_counter.c index 11da2cdb3..f00925216 100644 --- a/example/gatt_counter.c +++ b/example/gatt_counter.c @@ -89,14 +89,14 @@ static void beat(void); // Flags general discoverable, BR/EDR supported (== not supported flag not set) when ENABLE_GATT_OVER_CLASSIC is enabled #ifdef ENABLE_GATT_OVER_CLASSIC -static const uint8_t ad_flags = 0x02; +#define APP_AD_FLAGS 0x02 #else -static const uint8_t ad_flags = 0x06; +#define APP_AD_FLAGS 0x06 #endif const uint8_t adv_data[] = { // Flags general discoverable - 0x02, BLUETOOTH_DATA_TYPE_FLAGS, ad_flags, + 0x02, BLUETOOTH_DATA_TYPE_FLAGS, APP_AD_FLAGS, // Name 0x0b, BLUETOOTH_DATA_TYPE_COMPLETE_LOCAL_NAME, 'L', 'E', ' ', 'C', 'o', 'u', 'n', 't', 'e', 'r', // Incomplete List of 16-bit Service Class UUIDs -- FF10 - only valid for testing! diff --git a/example/gatt_streamer_server.c b/example/gatt_streamer_server.c index 36a725125..976f1b9fc 100644 --- a/example/gatt_streamer_server.c +++ b/example/gatt_streamer_server.c @@ -79,14 +79,14 @@ static void streamer(void); // Flags general discoverable, BR/EDR supported (== not supported flag not set) when ENABLE_GATT_OVER_CLASSIC is enabled #ifdef ENABLE_GATT_OVER_CLASSIC -static const uint8_t ad_flags = 0x02; +#define APP_AD_FLAGS 0x02 #else -static const uint8_t ad_flags = 0x06; +#define APP_AD_FLAGS 0x06 #endif const uint8_t adv_data[] = { // Flags general discoverable - 0x02, BLUETOOTH_DATA_TYPE_FLAGS, ad_flags, + 0x02, BLUETOOTH_DATA_TYPE_FLAGS, APP_AD_FLAGS, // Name 0x0c, BLUETOOTH_DATA_TYPE_COMPLETE_LOCAL_NAME, 'L', 'E', ' ', 'S', 't', 'r', 'e', 'a', 'm', 'e', 'r', // Incomplete List of 16-bit Service Class UUIDs -- FF10 - only valid for testing!