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