Reading 16 bits of data via SPI

The SPI data register is only 8 bits wide so to recieve 16 bits you have to read two bytes and combine the result-

byte spi_transfer(volatile byte data)
{
SPDR = data; // Start the transmission
while (!(SPSR & (1<<SPIF))); // Wait the end of the transmission
{
};
return SPDR; // return the received byte
}

spi_transfer(0x01); // send command to sensor
int xAxisValue;
xAxisValue = spi_transfer(0x00); // read the 1st byte
xAxisValue <<= 8; // shift the byte to the high 8 bits
xAxisValue |= spi_transfer(0x00); // read the 2nd byte and OR to the low 8 bits of xAxisValue

Hope this helps-