[riot-notifications] [RIOT] Implemented ASM module for mc1322x MCU (#172)

Thomas Eichinger notifications at github.com
Mon Aug 26 10:35:16 CEST 2013


> +    };
> +    union {
> +        uint32_t STATUS;			///< status register
> +        struct ASM_STATUS {
> +            uint32_t : 24;
> +            uint32_t DONE: 1;		///< operation is done
> +            uint32_t TEST_PASS: 1;	///< self test did pass
> +            uint32_t : 6;
> +        } STATUS_bits;
> +    };
> +    uint32_t reserved;
> +    uint32_t CBC_MAC_0;				///< Result of MAC calculation 0:31
> +    uint32_t CBC_MAC_1;				///< Result of MAC calculation 32:63
> +    uint32_t CBC_MAC_2;				///< Result of MAC calculation 64:95
> +    uint32_t CBC_MAC_3;				///< Result of MAC calculation 96:127
> +};

@Kijewski I see your point concerning padding on the other side I don't see where the compiler should add any padding in ```ASM_struct```. All members are ```uint32_t``` and the bit fields define unnamed ranges to fill 32 bits themselves. So "padding" is already handled in the definition of the bit fields and the structure gets aligned properly. 

But you are right concerning ```__attribute__ ((__packed__))``` because it wouldn't get propagated to the outer structure.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/172/files#r5973411
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130826/5a3902eb/attachment.html>


More information about the notifications mailing list