rename
This commit is contained in:
1 parent
5bd0b4dd87
commit
f973a13aaf
3 files changed
+6
-6
No files matched your search
@@ -103,7 +103,7 @@ void loop()
|
||||
void connect_callback(void)
|
||||
{
|
||||
char central_name[32] = { 0 };
|
||||
Bluefruit.Gap.getPeerDevName(central_name, sizeof(central_name));
|
||||
Bluefruit.Gap.getPeerName(central_name, sizeof(central_name));
|
||||
|
||||
Serial.print("Connected to ");
|
||||
Serial.println(central_name);
|
||||
|
||||
@@ -53,12 +53,12 @@ bool BLEGap::getTxPacket(uint16_t conn_handle)
|
||||
return xSemaphoreTake(_txpacket_sem[conn_handle], ms2tick(BLE_GENERIC_TIMEOUT));
|
||||
}
|
||||
|
||||
uint16_t BLEGap::getPeerDevName(char* buf, uint16_t bufsize)
|
||||
uint16_t BLEGap::getPeerName(char* buf, uint16_t bufsize)
|
||||
{
|
||||
return getPeerDevName(Bluefruit.connHandle(), buf, bufsize);
|
||||
return getPeerName(Bluefruit.connHandle(), buf, bufsize);
|
||||
}
|
||||
|
||||
uint16_t BLEGap::getPeerDevName(uint16_t conn_handle, char* buf, uint16_t bufsize)
|
||||
uint16_t BLEGap::getPeerName(uint16_t conn_handle, char* buf, uint16_t bufsize)
|
||||
{
|
||||
return Bluefruit.Gatt.readCharByUuid(conn_handle, BLEUuid(BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME), buf, bufsize);
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ class BLEGap
|
||||
bool getTxPacket(void);
|
||||
bool getTxPacket(uint16_t conn_handle);
|
||||
|
||||
uint16_t getPeerDevName(char* buf, uint16_t bufsize);
|
||||
uint16_t getPeerDevName(uint16_t conn_handle, char* buf, uint16_t bufsize);
|
||||
uint16_t getPeerName(char* buf, uint16_t bufsize);
|
||||
uint16_t getPeerName(uint16_t conn_handle, char* buf, uint16_t bufsize);
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* INTERNAL USAGE ONLY
|
||||
|
||||
Reference in new issue
Block a user