Skip to content

Commit 0003e1a

Browse files
committed
client characteristic rename assign, discoverDescriptor for internal ussage
1 parent ad313ee commit 0003e1a

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

libraries/Bluefruit52Lib/src/BLEClientCharacteristic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void BLEClientCharacteristic::begin(BLEClientService* parent_svc)
8181
_adamsg.begin(true);
8282
}
8383

84-
void BLEClientCharacteristic::assign(ble_gattc_char_t* gattc_chr)
84+
void BLEClientCharacteristic::_assign(ble_gattc_char_t* gattc_chr)
8585
{
8686
_chr = *gattc_chr;
8787
}
@@ -141,7 +141,7 @@ BLEClientService& BLEClientCharacteristic::parentService (void)
141141
return *_service;
142142
}
143143

144-
bool BLEClientCharacteristic::discoverDescriptor(uint16_t conn_handle, ble_gattc_handle_range_t hdl_range)
144+
bool BLEClientCharacteristic::_discoverDescriptor(uint16_t conn_handle, ble_gattc_handle_range_t hdl_range)
145145
{
146146
enum { MAX_DESCIRPTORS = 8 };
147147

libraries/Bluefruit52Lib/src/BLEClientCharacteristic.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ class BLEClientCharacteristic
5959
// Destructor
6060
virtual ~BLEClientCharacteristic();
6161

62-
void assign(ble_gattc_char_t* gattc_chr);
63-
bool discoverDescriptor(uint16_t conn_handle, ble_gattc_handle_range_t hdl_range);
64-
6562
void begin(BLEClientService* parent_svc = NULL);
6663

6764
bool discover(void);
@@ -97,6 +94,10 @@ class BLEClientCharacteristic
9794
void setNotifyCallback(notify_cb_t fp);
9895
void useAdaCallback(bool enabled);
9996

97+
/*------------- Internal usage -------------*/
98+
void _assign(ble_gattc_char_t* gattc_chr);
99+
bool _discoverDescriptor(uint16_t conn_handle, ble_gattc_handle_range_t hdl_range);
100+
100101
private:
101102
ble_gattc_char_t _chr;
102103
uint16_t _cccd_handle;

libraries/Bluefruit52Lib/src/BLEDiscovery.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ uint8_t BLEDiscovery::discoverCharacteristic(uint16_t conn_handle, BLEClientChar
135135
LOG_LV2("DISC", "[CHR] Found 0x%04X, handle = %d\n-----------------", disc_chr->chars[d].uuid.uuid, disc_chr->chars[d].handle_value);
136136

137137
// characteristic assign overload
138-
chr[i]->assign(&disc_chr->chars[d]);
138+
chr[i]->_assign(&disc_chr->chars[d]);
139139

140140
// only discover CCCD descriptor
141141
if (disc_chr->chars[d].char_props.notify || disc_chr->chars[d].char_props.indicate )
@@ -145,7 +145,7 @@ uint8_t BLEDiscovery::discoverCharacteristic(uint16_t conn_handle, BLEClientChar
145145
if ( range.start_handle <= range.end_handle )
146146
{
147147
// skip if reaching end of range (last char has no descriptor)p
148-
chr[i]->discoverDescriptor(conn_handle, range);
148+
chr[i]->_discoverDescriptor(conn_handle, range);
149149
}
150150
}
151151

0 commit comments

Comments
 (0)