Big endian vs little endian
Does someone know whether the LM3S811 ARM is a big endian or a little endian CPU? I would like to load the ADC sequencer 0 FIFO data to an unsigned short type data buffer. The ADCSequenceDataGet( ) function reads the ADC sequencer FIFO data to a unsigned long type buffer. Because the ADC data is a 10 bit long, using the unsigned long buffer waste at least double size of the RAM space. Can I simply read the 16-bit data by casting the sequencer 0 FIFO result register ADCSSFIFO0 to a 16-bit address: *pBuff ++ = HWREGH( <address of ADCSSFIFO0>); ? However, I know I cannot not do that if it is a big endian CPU. Thanks, Jingxi
login or register to reply
|