In reply to abasili:
Did you mean to declare data_t as struct packed?
And did you mean to say you have a function that writes a 13-bit packed struct, not 132? If that the case, you would have to write 10 data_t elements to get to 130 bits before you can do the first read of 128 bits. Why did you declare data as a fixed array of 3 data_t (which is 39-bits) ?
To answer your direct question "does this line of code work? Yes it does, but we still cannot answer if it does what you want it to do.