added isValidAddress()

This commit is contained in:
john30
2014-11-20 22:06:27 +01:00
parent fa568f9568
commit 0283b0e121
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -187,3 +187,7 @@ bool isMaster(unsigned char addr) {
&& ((addrLo == 0x0) || (addrLo == 0x1) || (addrLo == 0x3) || (addrLo == 0x7) || (addrLo == 0xF));
}
bool isValidAddress(unsigned char addr, bool allowBroadcast) {
return addr != SYN && addr != ESC && (allowBroadcast == true || addr != BROADCAST);
}