Is there any way to ensure byte alignment of structures using Dynamic C?

I have some Windows code (Visual Studio 2013) that uses byte aligned structures:

#pragma pack(push, 1)

// Some structures

#pragma pack(pop)

They are then copied directly into a byte array using memcpy and sent over the network to the rabbit board. I want to use these same structures on the rabbit board so that I don’t have to duplicate code.

Is there any way to force byte alignment in the Rabbit Board using Dynamic C?

What is the natural alignment on the Rabbit?

1 Like

The natural alignment in DC is byte alignment as the Rabbit processors don’t have any specific limitations on where multibyte values can reside.


Thanks for the answer. I was able to port the code and use the structures with few modifications.