AnsweredAssumed Answered

Accessing individual bytes in a long int

Question asked by Steve Church on May 23, 2013
Latest reply on May 30, 2013 by Monica Arvizu

I have to assemble a 4 byte int (long int) from four individual bytes that I am reading from a Flash memory device. Using lots of shifts seems a bit clumsy. Is there a method using a pointer to the long int to access the individual bytes? It seems a bit of a trivial question I know but I am a bit rusty with pointers. I'm using  a 9S08QE8.

 

Steve

Outcomes