mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
simplify and beautify portBYTE_ALIGNMENT (#309)
This commit is contained in:
parent
05ded5bd8d
commit
99295c9ae8
|
@ -53,29 +53,17 @@
|
||||||
|
|
||||||
#if portBYTE_ALIGNMENT == 32
|
#if portBYTE_ALIGNMENT == 32
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x001f )
|
#define portBYTE_ALIGNMENT_MASK ( 0x001f )
|
||||||
#endif
|
#elif portBYTE_ALIGNMENT == 16
|
||||||
|
|
||||||
#if portBYTE_ALIGNMENT == 16
|
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x000f )
|
#define portBYTE_ALIGNMENT_MASK ( 0x000f )
|
||||||
#endif
|
#elif portBYTE_ALIGNMENT == 8
|
||||||
|
|
||||||
#if portBYTE_ALIGNMENT == 8
|
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x0007 )
|
#define portBYTE_ALIGNMENT_MASK ( 0x0007 )
|
||||||
#endif
|
#elif portBYTE_ALIGNMENT == 4
|
||||||
|
|
||||||
#if portBYTE_ALIGNMENT == 4
|
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x0003 )
|
#define portBYTE_ALIGNMENT_MASK ( 0x0003 )
|
||||||
#endif
|
#elif portBYTE_ALIGNMENT == 2
|
||||||
|
|
||||||
#if portBYTE_ALIGNMENT == 2
|
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x0001 )
|
#define portBYTE_ALIGNMENT_MASK ( 0x0001 )
|
||||||
#endif
|
#elif portBYTE_ALIGNMENT == 1
|
||||||
|
|
||||||
#if portBYTE_ALIGNMENT == 1
|
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x0000 )
|
#define portBYTE_ALIGNMENT_MASK ( 0x0000 )
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
#ifndef portBYTE_ALIGNMENT_MASK
|
|
||||||
#error "Invalid portBYTE_ALIGNMENT definition"
|
#error "Invalid portBYTE_ALIGNMENT definition"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue