/*** ===================================================================** Method : SAC1_Read (bean Audio_Codec_CS4218)**** Description :** This method reads data from the SSI interface.** Parameters :** NAME - DESCRIPTION** * pBuffer - Pointer to the block of** received data** nBytes - Size of the block in bytes** * Rcv - Pointer to real number of the received** data** Returns :** --- - This method returns error codes from** ReciveBlock method of inherited** FreescaleSSI bean.** ===================================================================*/byte SAC1_Read(const void* pBuffer,word nBytes,word *Rcv){ byte err; word Bytes; UWord16 SamplesRead = 0; word NumSamplesReq = nBytes >> 1; if(!EnUser) SAC1_Enable(); do { err = Inhr1_RecvBlock((word*)pBuffer+SamplesRead, NumSamplesReq-SamplesRead, &Bytes); SamplesRead += Bytes; } while(SamplesRead < NumSamplesReq); *Rcv = SamplesRead << 1; return err;}