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