example: use #define for constants instead of const uint8_t to fix build

This commit is contained in:
Matthias Ringwald 2021-06-21 11:35:31 +02:00
parent acadfdd023
commit edf70fbf9f
2 changed files with 6 additions and 6 deletions

View File

@ -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!

View File

@ -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!