Skip to content

byteswap

byteswap

byteswap

A function to swap the bytes of a buffer in place. 2 implementations are provided: - numpy: The preferred implementation using numpy, which is usually available in Python and CircuitPython, and may be available in MicroPython with the numpy module. - viper: A viper implementation from viper_tools.py for MicroPython only

Functions:

byteswap

byteswap(buf)

Swap the bytes of a 16-bit buffer in place using viper.