|
mbserver 0.5.1
|
Classes | |
| class | _MemoryBlock |
| class | _MemoryBlockBits |
| class | _MemoryBlockRegs |
| class | _MbDevice |
Functions | |
| bytearray | swapbyteorder (bytearray data) |
@package docstring Documentation for this module. More details.
| bytearray mbserver.swapbyteorder | ( | bytearray | data | ) |
Swap adjacent bytes in a bytearray.
Swaps pairs (0↔1, 2↔3, 4↔5, ...) and leaves the last
byte unchanged if the length is odd.
Args:
data Bytearray to modify in place.
Returns:
Same `bytearray` object with bytes swapped.
Note:
Since v0.4.2