diff --git a/README.md b/README.md index 5d186af..8bf0296 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,7 @@ Example: `0xCB340102` is binary `1100 1011 0011 0100 0000 0001 0000 0010`.
`0x40802CD3` is binary `0100 0000 1000 0000 0010 1100 1101 0011`.
If you **read the first binary sequence backwards** (right to left), you get the second sequence. +You may use `bitreverseOneByte()` or `bitreverse32Bit()` for this.
diff --git a/examples/SendDemo/SendDemo.ino b/examples/SendDemo/SendDemo.ino index 97e7fa2..e6bd7d0 100644 --- a/examples/SendDemo/SendDemo.ino +++ b/examples/SendDemo/SendDemo.ino @@ -165,6 +165,7 @@ void loop() { /* * With Send sendNECMSB() you can send your old 32 bit codes. * To convert one into the other, you must reverse the byte positions and then reverse all positions of each byte. + * Use bitreverse32Bit(). * Example: * 0xCB340102 byte reverse -> 0x020134CB bit reverse-> 40802CD3 */ diff --git a/examples/UnitTest/UnitTest.ino b/examples/UnitTest/UnitTest.ino index dfae7cb..de76e93 100644 --- a/examples/UnitTest/UnitTest.ino +++ b/examples/UnitTest/UnitTest.ino @@ -419,6 +419,7 @@ void loop() { /* * With Send sendNECMSB() you can send your old 32 bit codes. * To convert one into the other, you must reverse the byte positions and then reverse all positions of each byte. + * Use bitreverse32Bit(). * Example: * 0xCB340102 byte reverse -> 0x020134CB bit reverse-> 40802CD3 */ diff --git a/src/ir_JVC.hpp b/src/ir_JVC.hpp index 89f9f91..24ef4fb 100644 --- a/src/ir_JVC.hpp +++ b/src/ir_JVC.hpp @@ -231,6 +231,7 @@ bool IRrecv::decodeJVCMSB(decode_results *aResults) { /** * With Send sendJVCMSB() you can send your old 32 bit codes. * To convert one into the other, you must reverse the byte positions and then reverse all bit positions of each byte. + * Use bitreverse32Bit(). * Or write it as one binary string and reverse/mirror it. * Example: * 0xCB340102 byte reverse -> 02 01 34 CB bit reverse-> 40 80 2C D3. diff --git a/src/ir_NEC.hpp b/src/ir_NEC.hpp index 1c02e7d..b689425 100644 --- a/src/ir_NEC.hpp +++ b/src/ir_NEC.hpp @@ -401,6 +401,7 @@ bool IRrecv::decodeNECMSB(decode_results *aResults) { /** * With Send sendNECMSB() you can send your old 32 bit codes. * To convert one into the other, you must reverse the byte positions and then reverse all bit positions of each byte. + * Use bitreverse32Bit(). * Or write it as one binary string and reverse/mirror it. * Example: * 0xCB340102 byte reverse -> 02 01 34 CB bit reverse-> 40 80 2C D3.