-->
Page 1 of 1

How to byte align struct which will be writen to flash?

PostPosted: Fri Apr 24, 2015 1:09 pm
by Patriko
Hi!

How to make a byte alignment (to uint32) of struct?

Thanks!
Patriko

Re: How to byte align struct which will be writen to flash?

PostPosted: Fri Apr 24, 2015 7:52 pm
by hdrut
Hi, basically if you have an uint8 and want to align to uint32 you could do something like this:

typedef struct {
uint8 my_index;
uint32 pad[3];
} AlignStruct;


Is this what you are looking for?