Sending a Byte using SPI in Arduino Nano

Hi,
I just wanted to confirm whether the following code is correct for sending out a byte of data (only once) using the SPI library in Arduino Nano.

I am asking so because I am very new to using Arduino and am facing some issues when using this for my project.

Thanks in advance.

#include <SPI.h>

uint8_t const ssFPGA = 10;

void setup()
{
  Serial.begin(115200);
  while (!Serial) 
  {
    ; // wait
  }
  SPI.begin();
  pinMode( ssFPGA, OUTPUT );
}

void loop() 
{
    digitalWrite( ssFPGA, 0 );
    delay( 10 );
    SPI.beginTransaction( SPISettings(16000000, MSBFIRST, SPI_MODE3 ) );
    {
         SPI.transfer(0x12);
         //SPI.transfer(0x34); // ------> for sending 2nd byte
         //SPI.transfer(0x56); // ------> for sending 3rd byte
    }
    SPI.endTransaction();
    digitalWrite( ssFPGA, 1 );
    while(1);
}

Yes, this way you can send one byte to the SPI bus.

Keep in mind that you would not reach 16MHz on a Nano, no matter what you specify in the SPISettings constructor.

If you have problems with SPI it might help more if you describe your problem in a bit more detail. Provide links to the hardware you use in your project.