-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba8af95
commit 7263001
Showing
4 changed files
with
64 additions
and
85 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ | ||
#define LOW_HIGH_UNION(name, low, high) \ | ||
union { \ | ||
struct { \ | ||
uint8_t low; \ | ||
uint8_t high; \ | ||
}; \ | ||
uint16_t name; \ | ||
} | ||
#else | ||
#define LOW_HIGH_UNION(name, low, high) \ | ||
union { \ | ||
struct { \ | ||
uint8_t high; \ | ||
uint8_t low; \ | ||
}; \ | ||
uint16_t name; \ | ||
} | ||
#endif |
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
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