Team Riedel - display
Dependencies: LCD_fonts SPI_TFT_ILI9341 CMSIS_DSP_401_without_cm4 mbed-src SDFileSystem wavfile
audio_if.h
00001 /** 00002 ****************************************************************************** 00003 * @file /Inc/audio_if.h 00004 * @author Central Labs 00005 * @version V1.0.0 00006 * @date 7-May-2015 00007 * @brief Header for audio_if.c file. 00008 ****************************************************************************** 00009 @attention 00010 * 00011 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> 00012 * 00013 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 00014 * You may not use this file except in compliance with the License. 00015 * You may obtain a copy of the License at: 00016 * 00017 * http://www.st.com/software_license_agreement_liberty_v2 00018 * 00019 * Redistribution and use in source and binary forms, with or without modification, 00020 * are permitted provided that the following conditions are met: 00021 * 1. Redistributions of source code must retain the above copyright notice, 00022 * this list of conditions and the following disclaimer. 00023 * 2. Redistributions in binary form must reproduce the above copyright notice, 00024 * this list of conditions and the following disclaimer in the documentation 00025 * and/or other materials provided with the distribution. 00026 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00027 * may be used to endorse or promote products derived from this software 00028 * without specific prior written permission. 00029 * 00030 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00031 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00032 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00033 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00034 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00035 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00036 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00037 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00038 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00039 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00040 * 00041 ****************************************************************************** 00042 */ 00043 00044 /* Define to prevent recursive inclusion -------------------------------------*/ 00045 #ifndef __AUDIO_IF_H 00046 #define __AUDIO_IF_H 00047 00048 /* Includes ------------------------------------------------------------------*/ 00049 #include "mbed.h" 00050 #include "main.h" 00051 //#include "x_nucleo_cca02m1_audio_l4.h" 00052 #include "stm32l476g_discovery_audio.h" 00053 #include <cstdint> 00054 00055 00056 /* Exported types ------------------------------------------------------------*/ 00057 /* Exported constants --------------------------------------------------------*/ 00058 /* Exported macro ------------------------------------------------------------*/ 00059 /* Exported functions ------------------------------------------------------- */ 00060 00061 00062 extern int8_t Audio_Init(void); 00063 extern int8_t Audio_Record(uint16_t * recbuff); 00064 //extern int8_t Audio_VolumeCtl(int16_t Volume); 00065 //extern int8_t Audio_MuteCtl(uint8_t cmd); 00066 extern int8_t Audio_Stop(void); 00067 //extern int8_t Audio_Pause(void); 00068 //extern int8_t Audio_Resume(void); 00069 //extern int8_t Audio_CommandMgr(uint8_t cmd); 00070 //extern void AudioProcess(uint16_t * pbuf, uint16_t * recbuff); 00071 extern void PrintData(uint16_t * recbuff); 00072 extern void WriteData(uint16_t * recbuff); 00073 //void BSP_AUDIO_IN_HalfTransfer_CallBack(void); 00074 00075 int rec(const char *filename, uint16_t * recbuff, uint16_t size); 00076 00077 /** 00078 * @brief Sampling Frequency enumerator 00079 */ 00080 typedef enum 00081 { 00082 SAMPLING_FREQ_16000 = 16000, 00083 SAMPLING_FREQ_32000 = 32000, 00084 SAMPLING_FREQ_48000 = 48000 00085 00086 }OUTPUT_FREQ_TypeDef; 00087 00088 00089 #define RAM_TOTAL 0x1000 00090 00091 #define AUDIO_CHANNELS 1 00092 #define AUDIO_SAMPLING_FREQUENCY 48000 00093 00094 #define PCM_TEMP_BUFF_SIZE AUDIO_SAMPLING_FREQUENCY/1000*1 00095 00096 00097 #if defined(STM32L053xx) || defined(STM32F072xB) 00098 #if (AUDIO_CHANNELS > 2) 00099 #error "Acquisition of more than 2 microphone is not yet supported for STM32L0 and STM32F0" 00100 #elif (AUDIO_SAMPLING_FREQUENCY > 32000) 00101 #error "Acquisition of sampling frequencies above 32 KHz is not yet supported for STM32L0 and STM32F0" 00102 #elif (AUDIO_SAMPLING_FREQUENCY == 32000 && AUDIO_CHANNELS == 2) 00103 #error "These settings are not yet supported for STM32L0 and STM32F0" 00104 #endif 00105 #endif 00106 00107 #endif 00108 /* __AUDIO_IF_H */ 00109 00110 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00111
Generated on Tue Jul 12 2022 15:34:17 by
![doxygen](doxygen.png)