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:
parent
8a951acb82
commit
0649a59b13
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue