Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: VL53L0X
Fork of BSP_B-L475E-IOT01 by
Drivers/BSP/Components/Common/audio.h@1:138e8076f348, 2017-01-31 (annotated)
- Committer:
 - bcostm
 - Date:
 - Tue Jan 31 09:31:29 2017 +0100
 - Revision:
 - 1:138e8076f348
 - Child:
 - 2:87208512ab66
 
Add BSP/Components/Common files
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| bcostm | 1:138e8076f348 | 1 | /** | 
| bcostm | 1:138e8076f348 | 2 | ****************************************************************************** | 
| bcostm | 1:138e8076f348 | 3 | * @file audio.h | 
| bcostm | 1:138e8076f348 | 4 | * @author MCD Application Team | 
| bcostm | 1:138e8076f348 | 5 | * @version V4.0.1 | 
| bcostm | 1:138e8076f348 | 6 | * @date 21-July-2015 | 
| bcostm | 1:138e8076f348 | 7 | * @brief This header file contains the common defines and functions prototypes | 
| bcostm | 1:138e8076f348 | 8 | * for the Audio driver. | 
| bcostm | 1:138e8076f348 | 9 | ****************************************************************************** | 
| bcostm | 1:138e8076f348 | 10 | * @attention | 
| bcostm | 1:138e8076f348 | 11 | * | 
| bcostm | 1:138e8076f348 | 12 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> | 
| bcostm | 1:138e8076f348 | 13 | * | 
| bcostm | 1:138e8076f348 | 14 | * Redistribution and use in source and binary forms, with or without modification, | 
| bcostm | 1:138e8076f348 | 15 | * are permitted provided that the following conditions are met: | 
| bcostm | 1:138e8076f348 | 16 | * 1. Redistributions of source code must retain the above copyright notice, | 
| bcostm | 1:138e8076f348 | 17 | * this list of conditions and the following disclaimer. | 
| bcostm | 1:138e8076f348 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, | 
| bcostm | 1:138e8076f348 | 19 | * this list of conditions and the following disclaimer in the documentation | 
| bcostm | 1:138e8076f348 | 20 | * and/or other materials provided with the distribution. | 
| bcostm | 1:138e8076f348 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors | 
| bcostm | 1:138e8076f348 | 22 | * may be used to endorse or promote products derived from this software | 
| bcostm | 1:138e8076f348 | 23 | * without specific prior written permission. | 
| bcostm | 1:138e8076f348 | 24 | * | 
| bcostm | 1:138e8076f348 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 
| bcostm | 1:138e8076f348 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 
| bcostm | 1:138e8076f348 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 
| bcostm | 1:138e8076f348 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | 
| bcostm | 1:138e8076f348 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 
| bcostm | 1:138e8076f348 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 
| bcostm | 1:138e8076f348 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | 
| bcostm | 1:138e8076f348 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | 
| bcostm | 1:138e8076f348 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 
| bcostm | 1:138e8076f348 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
| bcostm | 1:138e8076f348 | 35 | * | 
| bcostm | 1:138e8076f348 | 36 | ****************************************************************************** | 
| bcostm | 1:138e8076f348 | 37 | */ | 
| bcostm | 1:138e8076f348 | 38 | |
| bcostm | 1:138e8076f348 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ | 
| bcostm | 1:138e8076f348 | 40 | #ifndef __AUDIO_H | 
| bcostm | 1:138e8076f348 | 41 | #define __AUDIO_H | 
| bcostm | 1:138e8076f348 | 42 | |
| bcostm | 1:138e8076f348 | 43 | #ifdef __cplusplus | 
| bcostm | 1:138e8076f348 | 44 | extern "C" { | 
| bcostm | 1:138e8076f348 | 45 | #endif | 
| bcostm | 1:138e8076f348 | 46 | |
| bcostm | 1:138e8076f348 | 47 | /* Includes ------------------------------------------------------------------*/ | 
| bcostm | 1:138e8076f348 | 48 | #include <stdint.h> | 
| bcostm | 1:138e8076f348 | 49 | |
| bcostm | 1:138e8076f348 | 50 | /** @addtogroup BSP | 
| bcostm | 1:138e8076f348 | 51 | * @{ | 
| bcostm | 1:138e8076f348 | 52 | */ | 
| bcostm | 1:138e8076f348 | 53 | |
| bcostm | 1:138e8076f348 | 54 | /** @addtogroup Components | 
| bcostm | 1:138e8076f348 | 55 | * @{ | 
| bcostm | 1:138e8076f348 | 56 | */ | 
| bcostm | 1:138e8076f348 | 57 | |
| bcostm | 1:138e8076f348 | 58 | /** @addtogroup AUDIO | 
| bcostm | 1:138e8076f348 | 59 | * @{ | 
| bcostm | 1:138e8076f348 | 60 | */ | 
| bcostm | 1:138e8076f348 | 61 | |
| bcostm | 1:138e8076f348 | 62 | /** @defgroup AUDIO_Exported_Constants | 
| bcostm | 1:138e8076f348 | 63 | * @{ | 
| bcostm | 1:138e8076f348 | 64 | */ | 
| bcostm | 1:138e8076f348 | 65 | |
| bcostm | 1:138e8076f348 | 66 | /* Codec audio Standards */ | 
| bcostm | 1:138e8076f348 | 67 | #define CODEC_STANDARD 0x04 | 
| bcostm | 1:138e8076f348 | 68 | #define I2S_STANDARD I2S_STANDARD_PHILIPS | 
| bcostm | 1:138e8076f348 | 69 | |
| bcostm | 1:138e8076f348 | 70 | /** | 
| bcostm | 1:138e8076f348 | 71 | * @} | 
| bcostm | 1:138e8076f348 | 72 | */ | 
| bcostm | 1:138e8076f348 | 73 | |
| bcostm | 1:138e8076f348 | 74 | /** @defgroup AUDIO_Exported_Types | 
| bcostm | 1:138e8076f348 | 75 | * @{ | 
| bcostm | 1:138e8076f348 | 76 | */ | 
| bcostm | 1:138e8076f348 | 77 | |
| bcostm | 1:138e8076f348 | 78 | /** @defgroup AUDIO_Driver_structure Audio Driver structure | 
| bcostm | 1:138e8076f348 | 79 | * @{ | 
| bcostm | 1:138e8076f348 | 80 | */ | 
| bcostm | 1:138e8076f348 | 81 | typedef struct | 
| bcostm | 1:138e8076f348 | 82 | { | 
| bcostm | 1:138e8076f348 | 83 | uint32_t (*Init)(uint16_t, uint16_t, uint8_t, uint32_t); | 
| bcostm | 1:138e8076f348 | 84 | void (*DeInit)(void); | 
| bcostm | 1:138e8076f348 | 85 | uint32_t (*ReadID)(uint16_t); | 
| bcostm | 1:138e8076f348 | 86 | uint32_t (*Play)(uint16_t, uint16_t*, uint16_t); | 
| bcostm | 1:138e8076f348 | 87 | uint32_t (*Pause)(uint16_t); | 
| bcostm | 1:138e8076f348 | 88 | uint32_t (*Resume)(uint16_t); | 
| bcostm | 1:138e8076f348 | 89 | uint32_t (*Stop)(uint16_t, uint32_t); | 
| bcostm | 1:138e8076f348 | 90 | uint32_t (*SetFrequency)(uint16_t, uint32_t); | 
| bcostm | 1:138e8076f348 | 91 | uint32_t (*SetVolume)(uint16_t, uint8_t); | 
| bcostm | 1:138e8076f348 | 92 | uint32_t (*SetMute)(uint16_t, uint32_t); | 
| bcostm | 1:138e8076f348 | 93 | uint32_t (*SetOutputMode)(uint16_t, uint8_t); | 
| bcostm | 1:138e8076f348 | 94 | uint32_t (*Reset)(uint16_t); | 
| bcostm | 1:138e8076f348 | 95 | }AUDIO_DrvTypeDef; | 
| bcostm | 1:138e8076f348 | 96 | /** | 
| bcostm | 1:138e8076f348 | 97 | * @} | 
| bcostm | 1:138e8076f348 | 98 | */ | 
| bcostm | 1:138e8076f348 | 99 | |
| bcostm | 1:138e8076f348 | 100 | /** | 
| bcostm | 1:138e8076f348 | 101 | * @} | 
| bcostm | 1:138e8076f348 | 102 | */ | 
| bcostm | 1:138e8076f348 | 103 | |
| bcostm | 1:138e8076f348 | 104 | /** | 
| bcostm | 1:138e8076f348 | 105 | * @} | 
| bcostm | 1:138e8076f348 | 106 | */ | 
| bcostm | 1:138e8076f348 | 107 | |
| bcostm | 1:138e8076f348 | 108 | /** | 
| bcostm | 1:138e8076f348 | 109 | * @} | 
| bcostm | 1:138e8076f348 | 110 | */ | 
| bcostm | 1:138e8076f348 | 111 | |
| bcostm | 1:138e8076f348 | 112 | /** | 
| bcostm | 1:138e8076f348 | 113 | * @} | 
| bcostm | 1:138e8076f348 | 114 | */ | 
| bcostm | 1:138e8076f348 | 115 | |
| bcostm | 1:138e8076f348 | 116 | #ifdef __cplusplus | 
| bcostm | 1:138e8076f348 | 117 | } | 
| bcostm | 1:138e8076f348 | 118 | #endif | 
| bcostm | 1:138e8076f348 | 119 | |
| bcostm | 1:138e8076f348 | 120 | #endif /* __AUDIO_H */ | 
| bcostm | 1:138e8076f348 | 121 | |
| bcostm | 1:138e8076f348 | 122 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ | 
