Skip to content

Commit c5bc247

Browse files
committed
Nordic BLE: Use SD API version rather than SDK define.
1 parent e9ba841 commit c5bc247

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5XPalGattClient.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ ble_error_t nRF5XGattClient::exchange_mtu(connection_handle_t connection)
185185
ble_error_t nRF5XGattClient::get_mtu_size(
186186
connection_handle_t connection_handle, uint16_t& mtu_size
187187
) {
188-
#ifdef TARGET_SDK13
188+
#if (NRF_SD_BLE_API_VERSION >= 3)
189189
// FIXME: implement when MTU size can be configured; the mtu size must be
190190
// stored locally when BLE_GATTC_EVT_EXCHANGE_MTU_RSP has been received
191191
mtu_size = BLE_GATT_MTU_SIZE_DEFAULT;
@@ -1095,7 +1095,7 @@ struct nRF5XGattClient::DiscoverDescriptorsProcedure : RegularGattProcedure {
10951095
return response.count;
10961096
}
10971097

1098-
#ifndef TARGET_SDK13
1098+
#if (NRF_SD_BLE_API_VERSION < 3)
10991099
virtual information_data_t operator[](size_t i) const
11001100
{
11011101
information_data_t result = {
@@ -1113,7 +1113,7 @@ struct nRF5XGattClient::DiscoverDescriptorsProcedure : RegularGattProcedure {
11131113

11141114
return result;
11151115
}
1116-
#else /* TARGET_SDK13 */
1116+
#else
11171117
virtual information_data_t operator[](size_t i) const
11181118
{
11191119
if (response.format == BLE_GATTC_ATTR_INFO_FORMAT_16BIT) {
@@ -1207,7 +1207,7 @@ struct nRF5XGattClient::ReadUsingCharacteristicUUIDProcedure : RegularGattProced
12071207
return convert_sd_error(err);
12081208
}
12091209

1210-
#ifdef TARGET_SDK13
1210+
#if (NRF_SD_BLE_API_VERSION >= 3)
12111211
/**
12121212
* Adapt ble_gattc_evt_char_val_by_uuid_read_rsp_t into AttReadByTypeResponse.
12131213
*/

0 commit comments

Comments
 (0)