static boolean Sa9471SpiSync(Sa47321SpiCmd_e cmd,const Sa47321RegAddr_e addr,const uint8 wData, uint8* rData){
boolean rRet = TRUE;
uint8 parityValue =0;
Spi_SeqResultType seqRet = SPI_SEQ_OK;/*
SPI_SEQ_OK = 0, ///< @brief The last transmission of the Sequence has been finished successfully.
SPI_SEQ_PENDING, ///< @brief The SPI handler/Driver is performing a SPI Sequence.
SPI_SEQ_FAILED, ///< @brief The last transmission of the Sequence has failed.
SPI_SEQ_CANCELLED ///< @brief The last transmission of the Sequence has been cancelled by the user.
*/
Std_ReturnType ret = E_OK;///< Set setup an external buffer to be used by a specific channel.
ret =Spi_SetupEB(DS_SA47321_SPI_CHANNEL,(uint8*)&s_Dssa47321.TxFrame.U,(uint8*)&s_Dssa47321.RxFrame.U,2);if(ret == E_OK){
s_Dssa47321.RxFrame.U =0;
s_Dssa47321.TxFrame.U =0;
s_Dssa47321.TxFrame.B.Cmd = cmd;
s_Dssa47321.TxFrame.B.A0_A5 = addr;
s_Dssa47321.TxFrame.B.D0_D7 = wData;for(uint8 i=1; i<16; i++){
if(s_Dssa47321.TxFrame.U &(1<<i)){
parityValue++;}}
s_Dssa47321.TxFrame.B.T =((parityValue%2)!=0)?1:0;///< Start transmit data of sequence on the SPI bus synchronously.
ret =Spi_SyncTransmit(DS_SA47321_SPI_SEQUENCE);if(ret == E_OK){
do{
///< Get the last transmission result of the specified Sequence.
seqRet =Spi_GetSequenceResult(DS_SA47321_SPI_SEQUENCE);if((seqRet == SPI_SEQ_OK)&&(cmd == ReadReg)){
*rData = s_Dssa47321.RxFrame.B.D0_D7;break;}elseif(seqRet == SPI_SEQ_FAILED){
rRet = FALSE;break;}}while(seqRet == SPI_SEQ_PENDING);}else{
rRet = FALSE;}}else{
rRet = FALSE;}return rRet;}