Skip to content
Discussion options

You must be logged in to vote

Thanks @robert-hh for your quick suggestion!

I was trying exactly that while you came up with the suggestion :) and this actually works:
@micropython.viper
def _write_register(self, reg: int, data: int):
dc(0)
spi.write(bytearray((reg >> 8, reg & 0xFF)))
dc(1)
spi.write(bytearray((data >> 8, data & 0xFF)))

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@HLammers
Comment options

@robert-hh
Comment options

@HLammers
Comment options

Answer selected by HLammers
@robert-hh
Comment options

@HLammers
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants