Read / Write an acceleration sensor (ADXL345) with STM8
Did you look at the datasheet? None of the register addresses exceed 6 bits, so you don't need to worry about not having 8. Furthermore, the 2 extra bits are used to signify Read/notWrite and Multibyte access. 

Your write command matches your function (16 bits at a time), but there is really no way for you to do multibyte access with it. Perhaps a more generic function (one that can take a pointer to a buffer as an argument, along with transfer length) would be useful.

If you want to write 0x09 to register 0x2C, the command should be fine. However, I would still suggest using the SPI drivers from the SDK instead of writing your own.

To combine multiple fields you will need to do something like this:

#define WRITE (0 &lt;&lt; 7)
#define READ  (1 &lt;&lt; 7)
#define MB    (1 &lt;&lt; 6)


Then to form all 16 bits you would do:

uint16_t read_message = ((READ | addr) &lt;&lt; 8) | garbage;
uint16_t write_message = ((WRITE | addr) &lt;&lt; 8) | data;


If you wanted to issue a multibyte read message your first byte would become:

uint8_t read_multibyte = READ | MB | addr;


To expand on my previous comment about a more generic function, though, and one that would allow you to use multibyte commands, you could do something like this:

void sendCommand(uint8_t * buffer, uint8_t length)
{
   for (int i = 0; i &lt; length; i++)
   {
      sendByte(buffer[i]);
   }
}

void sendByte(uint8_t byteToSend)
{
   // Put an 8-bit of your SPI function here
}


Then the data you send can become:

buffer[0] = READ | MB | addr;
// The rest of the buffer doesn't matter since we are reading
sendCommand(buffer, 4); // Will receive 3 bytes


Also you may want to use brackets to make your commands easier to read and eliminate any potential errors due to order of operations.