1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00

function returning specific byte from 32 bit variables (untested)

This commit is contained in:
cTn 2014-09-16 19:26:06 +02:00
parent 8a951acb82
commit 0649a59b13

View file

@ -238,6 +238,10 @@ function lowByte(num) {
return 0x00FF & num;
}
function specificByte(num, pos) {
return 0x000000FF & (num >> (8 * pos));
}
function bit_check(num, bit) {
return ((num >> bit) % 2 != 0);
}