diff options
| author | Jeremiah McCarthy <[email protected]> | 2021-02-16 10:40:06 -0500 |
|---|---|---|
| committer | Jeremiah McCarthy <[email protected]> | 2021-02-16 10:43:52 -0500 |
| commit | f8fbc0930bd17b263ca702c0beb9f83af4429d0a (patch) | |
| tree | b47b6a6f41cd8115d4a7d6acf2af4e2872f7a86c /src/tusb_option.h | |
| parent | 09868434cd9f53394350cce682333ada97f796c3 (diff) | |
Add alternate bitfield padding option
Adds configuration option CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT, which
substitutes bitfield variable " : 0" padding syntax with an unused
variable of size equal to the remaining number of bits.
This change resolves aligned access issues for some platforms.
Default behavior is original if the option is not explicitly enabled.
Diffstat (limited to 'src/tusb_option.h')
| -rw-r--r-- | src/tusb_option.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tusb_option.h b/src/tusb_option.h index 6cbdefbf1..b5504d29c 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -197,6 +197,10 @@ #define CFG_TUSB_OS OPT_OS_NONE #endif +#ifndef CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT + #define CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT 0 +#endif + //-------------------------------------------------------------------- // DEVICE OPTIONS //-------------------------------------------------------------------- |
