• Accessing bytes of long data type
    I know that longs are stored MSB first in memory. I need to access individual bytes of a long in order to send them out the SPI port. There are a number of ways to do this, I'd like your opinion on which...
  • Accessing bytes of long data type
    I know that longs are stored MSB first in memory. I need to access individual bytes of a long in order to send them out the SPI port. There are a number of ways to do this, I'd like your opinion on which...
  • Efficiently splitting a long int into bytes
    Hi All, This is related to my previous post, "Efficiently combining bytes into a long int". I'd like to find an efficient way to do this. My current implementation (below) results in (unnecessary...
  • Efficiently combining bytes into a long int
    Hi, I'm having problems assembling a set of 4 bytes into a long int. My approach has been this: ulong temp; temp = (temp << SHIFT_BYTE) | getByte(); temp = (temp << SHIFT_BYTE) | getByte();...
  • Efficiently splitting a long int into bytes
    Hi All, This is related to my previous post, "Efficiently combining bytes into a long int". I'd like to find an efficient way to do this. My current implementation (below) results in (unnecessary...