Created
August 30, 2018 15:37
-
-
Save vlna/e2542539099c644fbce33804d96a557b to your computer and use it in GitHub Desktop.
automagic uint16 to 2xuint8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
union { | |
uint16_t data; | |
struct { | |
uint8_t l; | |
uint8_t h; | |
} s; | |
} u; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment