Taken from https://github.com/echo-lalia/qmi8658-micropython/blob/main/qmi8685.py but renamed correctly.