add printBufferReverse

This commit is contained in:
hathach committed 2017-11-22 09:11:24 +07:00
1 parent 182d59c683
commit ea73d76513
6 files changed
+27 -13

No files matched your search

+2 -9
View File
@@ -488,15 +488,8 @@ void AdafruitBluefruit::printInfo(void)
uint8_t mac[6];
uint8_t type = Gap.getAddr(mac);
// MAC is in little endian --> reverse
for(int i=0; i < 3; i++)
{
uint8_t temp = mac[i];
mac[i] = mac[5-i];
mac[5-i] = temp;
}
Serial.printBuffer(mac, 6, ':');
// MAC is in little endian --> print reverse
Serial.printBufferReverse(mac, 6, ':');
Serial.printf(" (%s)", type_str[type]);
}
Serial.println();