Skip to content

MicroPython module to swap two bytes in bytearray. For addressing byte order issues in RGB565 displays.

Notifications You must be signed in to change notification settings

CatMeowByte/byteswap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

ByteSwap MicroPython Utility Module

A MicroPython viper utility module to swap two bytes in a bytearray. Designed for use with RGB565 displays that have byte order issues.

Usage Example

from byteswap import byteswap

data = bytearray(b'\xF8\x00\xAA\xBB')
print(data)  # b'\xF8\x00\xAA\xBB'
byteswap(data, len(data))
print(data)  # b'\x00\xF8\xBB\xAA'

License

This project is provided under the Public Domain License. Feel free to use, modify, and distribute it according to the terms of the license.

About

MicroPython module to swap two bytes in bytearray. For addressing byte order issues in RGB565 displays.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages