#include "define.h"
#include "BoardCfg.h"
#include "SPI.h"

unsigned char SPITransaction(unsigned char OutBuf, unsigned char BaudRate)
{
    
    SPI2BRG = BaudRate;
    
  //  WIFI_SPI_SS_PIN = 0;
        
    SPI2BUF = OutBuf;
    while(!SPI2STATbits.SPIRBF);
    
    OutBuf = SPI2BUF;
    
  //  WIFI_SPI_SS_PIN = 1;
    
    return OutBuf;
}
