Raspberry PI and Arduino SPI Communication

I have a very simple C program on my raspberry PI which sends the string “HELLO\n” to my Arduino via SPI.

#include <stdio.h>
#include <inttypes.h> // provides uint8_t etc
#include <wiringPi.h>
#include <wiringPiSPI.h>

void sendSPI (void);

int main (void){
        wiringPiSetup();
        wiringPiSPISetup(1, 500000);
        pinMode(7,OUTPUT);
        digitalWrite(7,1);

        while (1){
                sendSPI();
        }

        return(0);
}


void sendSPI (void)
{
        uint8_t a[] = {'1'};
        uint8_t b[] = {'1'};

        wiringPiSPIDataRW(1,a,1);
        wiringPiSPIDataRW(1,b,1);

        uint8_t message[] = {'H','E','L','L','O','\n'};

        digitalWrite(7,0);

        wiringPiSPIDataRW(1,message,6);

        digitalWrite(7,1);

        printf("Sent data\n");
        sleep(1);  // 1 seconds delay
}

Here is my arduino code, mostly taken from Nick Gammon’s code with a few modifications. I also included the ability to detect the SS going low with an interrupt.

#include <SPI.h>

char buf [100];
volatile byte pos;
volatile boolean process_it;

int redLedStatus = 0;

// start of transaction, no command yet
void ss_falling ()
{
  
}  // end of interrupt service routine (ISR) ss_falling

void setup (void){
  Serial.begin (9600);   // debugging

  // have to send on master in, *slave out*
  pinMode(MISO, OUTPUT);
  
  // turn on SPI in slave mode
  SPCR |= _BV(SPE);
  
  
  // turn on interrupts
  SPCR |= _BV(SPIE);

  
  // get ready for an interrupt 
  pos = 0;   // buffer empty
  process_it = false;
  
  //SPI.setClockDivider(SPI_CLOCK_DIV4);
  
  // interrupt for SS falling edge
  attachInterrupt (0, ss_falling, FALLING);

}  // end of setup


// SPI interrupt routine
ISR (SPI_STC_vect){
  byte c = SPDR;  // grab byte from SPI Data Register
  
  // add to buffer if room
  if (pos < sizeof buf)
    {
    buf [pos++] = c;
    
    // example: newline means time to process buffer
    if (c == '\n')
      process_it = true;
      
    }  // end of room available
}  // end of interrupt routine SPI_STC_vect

// main loop - wait for flag set in interrupt routine
void loop (void)
{
  if (process_it)
    {
      buf [pos] = 0;  
      Serial.println (buf);
      Serial.println("Processed buffer");
      if(strcmp(buf,"HELLO\n")==0){
        Bean.setLedGreen(255);
      }
      if(strcmp(buf,"HELLO")==0){
        Bean.setLedBlue(255);
      }
      if (redLedStatus == 0){
        Bean.setLedRed(255);
        redLedStatus = 1;
      }
      else{
        Bean.setLedRed(0);
        redLedStatus = 0;
        Bean.sleep(1000);
      }
      pos = 0;
      process_it = false;
    }  // end of flag set 
}  // end of loop

My main question centers around the C code that I have. In the beginning of my sendSPI() function, I have these 4 lines:

uint8_t a[] = {'1'};
uint8_t b[] = {'1'};

wiringPiSPIDataRW(1,a,1);
wiringPiSPIDataRW(1,b,1);

Essentially I send two dummy bytes of data to the Arduino before pulling my SS low and then sending my message. If I don’t include these bytes each time I wish to send a message the Arduino’s buffer constantly “consumes” 2 bytes of the message that I send. Could anyone possibly shed any light as to what these two dummy bytes could be used for since I’m sure they serve a purpose that I’m not using them for. Essentially why do I need to send two dummy bytes before sending my data?

Thanks