Esempio n. 1
0
bool Putz01I2S3Start (void) {
	puts ("Putz01I2S3Start() Enter\r");
	HAL_StatusTypeDef sts = HAL_I2S_Receive_DMA(&hi2s3, (uint16_t*)I2S3Buf, sizeof(I2S3Buf)/sizeof(I2S3Buf[0]));//I2S3BUFSZ*sizeof(I2sData_t)/sizeof(uint16_t));
	PUTZ_ASSERT(sts==HAL_OK);
	return true;
}
/**
  * @brief  Start audio recording
  * @param  pbuf Main buffer pointer for the recorded data storing  
  * @param  size Current size of the recorded buffer
  * @retval AUDIO_OK if correct communication, else wrong communication
  */
uint8_t BSP_AUDIO_IN_Record(uint16_t* pbuf, uint32_t size)
{
  uint32_t ret = AUDIO_ERROR;
  
  /* Start the process receive DMA */
  HAL_I2S_Receive_DMA(&hAudioInI2s, pbuf, size);
  
  /* Return 0 if all operations are OK */
  ret = AUDIO_OK;
  return ret;
}