mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_DISCO_F100RB/stm32f10x_spi.h@126:549ba18ddd81, 2014-03-19 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Mar 19 16:00:09 2014 +0000
- Revision:
- 126:549ba18ddd81
Synchronized with git revision cf8fd1cf86b0cd85131dd24a6ded21cc6fe04827
Full URL: https://github.com/mbedmicro/mbed/commit/cf8fd1cf86b0cd85131dd24a6ded21cc6fe04827/
Conflicts:
workspace_tools/targets.py
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 126:549ba18ddd81 | 1 | /** |
mbed_official | 126:549ba18ddd81 | 2 | ****************************************************************************** |
mbed_official | 126:549ba18ddd81 | 3 | * @file stm32f10x_spi.h |
mbed_official | 126:549ba18ddd81 | 4 | * @author MCD Application Team |
mbed_official | 126:549ba18ddd81 | 5 | * @version V3.6.1 |
mbed_official | 126:549ba18ddd81 | 6 | * @date 05-March-2012 |
mbed_official | 126:549ba18ddd81 | 7 | * @brief This file contains all the functions prototypes for the SPI firmware |
mbed_official | 126:549ba18ddd81 | 8 | * library. |
mbed_official | 126:549ba18ddd81 | 9 | ******************************************************************************* |
mbed_official | 126:549ba18ddd81 | 10 | * Copyright (c) 2014, STMicroelectronics |
mbed_official | 126:549ba18ddd81 | 11 | * All rights reserved. |
mbed_official | 126:549ba18ddd81 | 12 | * |
mbed_official | 126:549ba18ddd81 | 13 | * Redistribution and use in source and binary forms, with or without |
mbed_official | 126:549ba18ddd81 | 14 | * modification, are permitted provided that the following conditions are met: |
mbed_official | 126:549ba18ddd81 | 15 | * |
mbed_official | 126:549ba18ddd81 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 126:549ba18ddd81 | 17 | * this list of conditions and the following disclaimer. |
mbed_official | 126:549ba18ddd81 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 126:549ba18ddd81 | 19 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 126:549ba18ddd81 | 20 | * and/or other materials provided with the distribution. |
mbed_official | 126:549ba18ddd81 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 126:549ba18ddd81 | 22 | * may be used to endorse or promote products derived from this software |
mbed_official | 126:549ba18ddd81 | 23 | * without specific prior written permission. |
mbed_official | 126:549ba18ddd81 | 24 | * |
mbed_official | 126:549ba18ddd81 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 126:549ba18ddd81 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 126:549ba18ddd81 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 126:549ba18ddd81 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 126:549ba18ddd81 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 126:549ba18ddd81 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 126:549ba18ddd81 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 126:549ba18ddd81 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 126:549ba18ddd81 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 126:549ba18ddd81 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 126:549ba18ddd81 | 35 | ******************************************************************************* |
mbed_official | 126:549ba18ddd81 | 36 | */ |
mbed_official | 126:549ba18ddd81 | 37 | |
mbed_official | 126:549ba18ddd81 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 126:549ba18ddd81 | 39 | #ifndef __STM32F10x_SPI_H |
mbed_official | 126:549ba18ddd81 | 40 | #define __STM32F10x_SPI_H |
mbed_official | 126:549ba18ddd81 | 41 | |
mbed_official | 126:549ba18ddd81 | 42 | #ifdef __cplusplus |
mbed_official | 126:549ba18ddd81 | 43 | extern "C" { |
mbed_official | 126:549ba18ddd81 | 44 | #endif |
mbed_official | 126:549ba18ddd81 | 45 | |
mbed_official | 126:549ba18ddd81 | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 126:549ba18ddd81 | 47 | #include "stm32f10x.h" |
mbed_official | 126:549ba18ddd81 | 48 | |
mbed_official | 126:549ba18ddd81 | 49 | /** @addtogroup STM32F10x_StdPeriph_Driver |
mbed_official | 126:549ba18ddd81 | 50 | * @{ |
mbed_official | 126:549ba18ddd81 | 51 | */ |
mbed_official | 126:549ba18ddd81 | 52 | |
mbed_official | 126:549ba18ddd81 | 53 | /** @addtogroup SPI |
mbed_official | 126:549ba18ddd81 | 54 | * @{ |
mbed_official | 126:549ba18ddd81 | 55 | */ |
mbed_official | 126:549ba18ddd81 | 56 | |
mbed_official | 126:549ba18ddd81 | 57 | /** @defgroup SPI_Exported_Types |
mbed_official | 126:549ba18ddd81 | 58 | * @{ |
mbed_official | 126:549ba18ddd81 | 59 | */ |
mbed_official | 126:549ba18ddd81 | 60 | |
mbed_official | 126:549ba18ddd81 | 61 | /** |
mbed_official | 126:549ba18ddd81 | 62 | * @brief SPI Init structure definition |
mbed_official | 126:549ba18ddd81 | 63 | */ |
mbed_official | 126:549ba18ddd81 | 64 | |
mbed_official | 126:549ba18ddd81 | 65 | typedef struct |
mbed_official | 126:549ba18ddd81 | 66 | { |
mbed_official | 126:549ba18ddd81 | 67 | uint16_t SPI_Direction; /*!< Specifies the SPI unidirectional or bidirectional data mode. |
mbed_official | 126:549ba18ddd81 | 68 | This parameter can be a value of @ref SPI_data_direction */ |
mbed_official | 126:549ba18ddd81 | 69 | |
mbed_official | 126:549ba18ddd81 | 70 | uint16_t SPI_Mode; /*!< Specifies the SPI operating mode. |
mbed_official | 126:549ba18ddd81 | 71 | This parameter can be a value of @ref SPI_mode */ |
mbed_official | 126:549ba18ddd81 | 72 | |
mbed_official | 126:549ba18ddd81 | 73 | uint16_t SPI_DataSize; /*!< Specifies the SPI data size. |
mbed_official | 126:549ba18ddd81 | 74 | This parameter can be a value of @ref SPI_data_size */ |
mbed_official | 126:549ba18ddd81 | 75 | |
mbed_official | 126:549ba18ddd81 | 76 | uint16_t SPI_CPOL; /*!< Specifies the serial clock steady state. |
mbed_official | 126:549ba18ddd81 | 77 | This parameter can be a value of @ref SPI_Clock_Polarity */ |
mbed_official | 126:549ba18ddd81 | 78 | |
mbed_official | 126:549ba18ddd81 | 79 | uint16_t SPI_CPHA; /*!< Specifies the clock active edge for the bit capture. |
mbed_official | 126:549ba18ddd81 | 80 | This parameter can be a value of @ref SPI_Clock_Phase */ |
mbed_official | 126:549ba18ddd81 | 81 | |
mbed_official | 126:549ba18ddd81 | 82 | uint16_t SPI_NSS; /*!< Specifies whether the NSS signal is managed by |
mbed_official | 126:549ba18ddd81 | 83 | hardware (NSS pin) or by software using the SSI bit. |
mbed_official | 126:549ba18ddd81 | 84 | This parameter can be a value of @ref SPI_Slave_Select_management */ |
mbed_official | 126:549ba18ddd81 | 85 | |
mbed_official | 126:549ba18ddd81 | 86 | uint16_t SPI_BaudRatePrescaler; /*!< Specifies the Baud Rate prescaler value which will be |
mbed_official | 126:549ba18ddd81 | 87 | used to configure the transmit and receive SCK clock. |
mbed_official | 126:549ba18ddd81 | 88 | This parameter can be a value of @ref SPI_BaudRate_Prescaler. |
mbed_official | 126:549ba18ddd81 | 89 | @note The communication clock is derived from the master |
mbed_official | 126:549ba18ddd81 | 90 | clock. The slave clock does not need to be set. */ |
mbed_official | 126:549ba18ddd81 | 91 | |
mbed_official | 126:549ba18ddd81 | 92 | uint16_t SPI_FirstBit; /*!< Specifies whether data transfers start from MSB or LSB bit. |
mbed_official | 126:549ba18ddd81 | 93 | This parameter can be a value of @ref SPI_MSB_LSB_transmission */ |
mbed_official | 126:549ba18ddd81 | 94 | |
mbed_official | 126:549ba18ddd81 | 95 | uint16_t SPI_CRCPolynomial; /*!< Specifies the polynomial used for the CRC calculation. */ |
mbed_official | 126:549ba18ddd81 | 96 | }SPI_InitTypeDef; |
mbed_official | 126:549ba18ddd81 | 97 | |
mbed_official | 126:549ba18ddd81 | 98 | /** |
mbed_official | 126:549ba18ddd81 | 99 | * @brief I2S Init structure definition |
mbed_official | 126:549ba18ddd81 | 100 | */ |
mbed_official | 126:549ba18ddd81 | 101 | |
mbed_official | 126:549ba18ddd81 | 102 | typedef struct |
mbed_official | 126:549ba18ddd81 | 103 | { |
mbed_official | 126:549ba18ddd81 | 104 | |
mbed_official | 126:549ba18ddd81 | 105 | uint16_t I2S_Mode; /*!< Specifies the I2S operating mode. |
mbed_official | 126:549ba18ddd81 | 106 | This parameter can be a value of @ref I2S_Mode */ |
mbed_official | 126:549ba18ddd81 | 107 | |
mbed_official | 126:549ba18ddd81 | 108 | uint16_t I2S_Standard; /*!< Specifies the standard used for the I2S communication. |
mbed_official | 126:549ba18ddd81 | 109 | This parameter can be a value of @ref I2S_Standard */ |
mbed_official | 126:549ba18ddd81 | 110 | |
mbed_official | 126:549ba18ddd81 | 111 | uint16_t I2S_DataFormat; /*!< Specifies the data format for the I2S communication. |
mbed_official | 126:549ba18ddd81 | 112 | This parameter can be a value of @ref I2S_Data_Format */ |
mbed_official | 126:549ba18ddd81 | 113 | |
mbed_official | 126:549ba18ddd81 | 114 | uint16_t I2S_MCLKOutput; /*!< Specifies whether the I2S MCLK output is enabled or not. |
mbed_official | 126:549ba18ddd81 | 115 | This parameter can be a value of @ref I2S_MCLK_Output */ |
mbed_official | 126:549ba18ddd81 | 116 | |
mbed_official | 126:549ba18ddd81 | 117 | uint32_t I2S_AudioFreq; /*!< Specifies the frequency selected for the I2S communication. |
mbed_official | 126:549ba18ddd81 | 118 | This parameter can be a value of @ref I2S_Audio_Frequency */ |
mbed_official | 126:549ba18ddd81 | 119 | |
mbed_official | 126:549ba18ddd81 | 120 | uint16_t I2S_CPOL; /*!< Specifies the idle state of the I2S clock. |
mbed_official | 126:549ba18ddd81 | 121 | This parameter can be a value of @ref I2S_Clock_Polarity */ |
mbed_official | 126:549ba18ddd81 | 122 | }I2S_InitTypeDef; |
mbed_official | 126:549ba18ddd81 | 123 | |
mbed_official | 126:549ba18ddd81 | 124 | /** |
mbed_official | 126:549ba18ddd81 | 125 | * @} |
mbed_official | 126:549ba18ddd81 | 126 | */ |
mbed_official | 126:549ba18ddd81 | 127 | |
mbed_official | 126:549ba18ddd81 | 128 | /** @defgroup SPI_Exported_Constants |
mbed_official | 126:549ba18ddd81 | 129 | * @{ |
mbed_official | 126:549ba18ddd81 | 130 | */ |
mbed_official | 126:549ba18ddd81 | 131 | |
mbed_official | 126:549ba18ddd81 | 132 | #define IS_SPI_ALL_PERIPH(PERIPH) (((PERIPH) == SPI1) || \ |
mbed_official | 126:549ba18ddd81 | 133 | ((PERIPH) == SPI2) || \ |
mbed_official | 126:549ba18ddd81 | 134 | ((PERIPH) == SPI3)) |
mbed_official | 126:549ba18ddd81 | 135 | |
mbed_official | 126:549ba18ddd81 | 136 | #define IS_SPI_23_PERIPH(PERIPH) (((PERIPH) == SPI2) || \ |
mbed_official | 126:549ba18ddd81 | 137 | ((PERIPH) == SPI3)) |
mbed_official | 126:549ba18ddd81 | 138 | |
mbed_official | 126:549ba18ddd81 | 139 | /** @defgroup SPI_data_direction |
mbed_official | 126:549ba18ddd81 | 140 | * @{ |
mbed_official | 126:549ba18ddd81 | 141 | */ |
mbed_official | 126:549ba18ddd81 | 142 | |
mbed_official | 126:549ba18ddd81 | 143 | #define SPI_Direction_2Lines_FullDuplex ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 144 | #define SPI_Direction_2Lines_RxOnly ((uint16_t)0x0400) |
mbed_official | 126:549ba18ddd81 | 145 | #define SPI_Direction_1Line_Rx ((uint16_t)0x8000) |
mbed_official | 126:549ba18ddd81 | 146 | #define SPI_Direction_1Line_Tx ((uint16_t)0xC000) |
mbed_official | 126:549ba18ddd81 | 147 | #define IS_SPI_DIRECTION_MODE(MODE) (((MODE) == SPI_Direction_2Lines_FullDuplex) || \ |
mbed_official | 126:549ba18ddd81 | 148 | ((MODE) == SPI_Direction_2Lines_RxOnly) || \ |
mbed_official | 126:549ba18ddd81 | 149 | ((MODE) == SPI_Direction_1Line_Rx) || \ |
mbed_official | 126:549ba18ddd81 | 150 | ((MODE) == SPI_Direction_1Line_Tx)) |
mbed_official | 126:549ba18ddd81 | 151 | /** |
mbed_official | 126:549ba18ddd81 | 152 | * @} |
mbed_official | 126:549ba18ddd81 | 153 | */ |
mbed_official | 126:549ba18ddd81 | 154 | |
mbed_official | 126:549ba18ddd81 | 155 | /** @defgroup SPI_mode |
mbed_official | 126:549ba18ddd81 | 156 | * @{ |
mbed_official | 126:549ba18ddd81 | 157 | */ |
mbed_official | 126:549ba18ddd81 | 158 | |
mbed_official | 126:549ba18ddd81 | 159 | #define SPI_Mode_Master ((uint16_t)0x0104) |
mbed_official | 126:549ba18ddd81 | 160 | #define SPI_Mode_Slave ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 161 | #define IS_SPI_MODE(MODE) (((MODE) == SPI_Mode_Master) || \ |
mbed_official | 126:549ba18ddd81 | 162 | ((MODE) == SPI_Mode_Slave)) |
mbed_official | 126:549ba18ddd81 | 163 | /** |
mbed_official | 126:549ba18ddd81 | 164 | * @} |
mbed_official | 126:549ba18ddd81 | 165 | */ |
mbed_official | 126:549ba18ddd81 | 166 | |
mbed_official | 126:549ba18ddd81 | 167 | /** @defgroup SPI_data_size |
mbed_official | 126:549ba18ddd81 | 168 | * @{ |
mbed_official | 126:549ba18ddd81 | 169 | */ |
mbed_official | 126:549ba18ddd81 | 170 | |
mbed_official | 126:549ba18ddd81 | 171 | #define SPI_DataSize_16b ((uint16_t)0x0800) |
mbed_official | 126:549ba18ddd81 | 172 | #define SPI_DataSize_8b ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 173 | #define IS_SPI_DATASIZE(DATASIZE) (((DATASIZE) == SPI_DataSize_16b) || \ |
mbed_official | 126:549ba18ddd81 | 174 | ((DATASIZE) == SPI_DataSize_8b)) |
mbed_official | 126:549ba18ddd81 | 175 | /** |
mbed_official | 126:549ba18ddd81 | 176 | * @} |
mbed_official | 126:549ba18ddd81 | 177 | */ |
mbed_official | 126:549ba18ddd81 | 178 | |
mbed_official | 126:549ba18ddd81 | 179 | /** @defgroup SPI_Clock_Polarity |
mbed_official | 126:549ba18ddd81 | 180 | * @{ |
mbed_official | 126:549ba18ddd81 | 181 | */ |
mbed_official | 126:549ba18ddd81 | 182 | |
mbed_official | 126:549ba18ddd81 | 183 | #define SPI_CPOL_Low ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 184 | #define SPI_CPOL_High ((uint16_t)0x0002) |
mbed_official | 126:549ba18ddd81 | 185 | #define IS_SPI_CPOL(CPOL) (((CPOL) == SPI_CPOL_Low) || \ |
mbed_official | 126:549ba18ddd81 | 186 | ((CPOL) == SPI_CPOL_High)) |
mbed_official | 126:549ba18ddd81 | 187 | /** |
mbed_official | 126:549ba18ddd81 | 188 | * @} |
mbed_official | 126:549ba18ddd81 | 189 | */ |
mbed_official | 126:549ba18ddd81 | 190 | |
mbed_official | 126:549ba18ddd81 | 191 | /** @defgroup SPI_Clock_Phase |
mbed_official | 126:549ba18ddd81 | 192 | * @{ |
mbed_official | 126:549ba18ddd81 | 193 | */ |
mbed_official | 126:549ba18ddd81 | 194 | |
mbed_official | 126:549ba18ddd81 | 195 | #define SPI_CPHA_1Edge ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 196 | #define SPI_CPHA_2Edge ((uint16_t)0x0001) |
mbed_official | 126:549ba18ddd81 | 197 | #define IS_SPI_CPHA(CPHA) (((CPHA) == SPI_CPHA_1Edge) || \ |
mbed_official | 126:549ba18ddd81 | 198 | ((CPHA) == SPI_CPHA_2Edge)) |
mbed_official | 126:549ba18ddd81 | 199 | /** |
mbed_official | 126:549ba18ddd81 | 200 | * @} |
mbed_official | 126:549ba18ddd81 | 201 | */ |
mbed_official | 126:549ba18ddd81 | 202 | |
mbed_official | 126:549ba18ddd81 | 203 | /** @defgroup SPI_Slave_Select_management |
mbed_official | 126:549ba18ddd81 | 204 | * @{ |
mbed_official | 126:549ba18ddd81 | 205 | */ |
mbed_official | 126:549ba18ddd81 | 206 | |
mbed_official | 126:549ba18ddd81 | 207 | #define SPI_NSS_Soft ((uint16_t)0x0200) |
mbed_official | 126:549ba18ddd81 | 208 | #define SPI_NSS_Hard ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 209 | #define IS_SPI_NSS(NSS) (((NSS) == SPI_NSS_Soft) || \ |
mbed_official | 126:549ba18ddd81 | 210 | ((NSS) == SPI_NSS_Hard)) |
mbed_official | 126:549ba18ddd81 | 211 | /** |
mbed_official | 126:549ba18ddd81 | 212 | * @} |
mbed_official | 126:549ba18ddd81 | 213 | */ |
mbed_official | 126:549ba18ddd81 | 214 | |
mbed_official | 126:549ba18ddd81 | 215 | /** @defgroup SPI_BaudRate_Prescaler |
mbed_official | 126:549ba18ddd81 | 216 | * @{ |
mbed_official | 126:549ba18ddd81 | 217 | */ |
mbed_official | 126:549ba18ddd81 | 218 | |
mbed_official | 126:549ba18ddd81 | 219 | #define SPI_BaudRatePrescaler_2 ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 220 | #define SPI_BaudRatePrescaler_4 ((uint16_t)0x0008) |
mbed_official | 126:549ba18ddd81 | 221 | #define SPI_BaudRatePrescaler_8 ((uint16_t)0x0010) |
mbed_official | 126:549ba18ddd81 | 222 | #define SPI_BaudRatePrescaler_16 ((uint16_t)0x0018) |
mbed_official | 126:549ba18ddd81 | 223 | #define SPI_BaudRatePrescaler_32 ((uint16_t)0x0020) |
mbed_official | 126:549ba18ddd81 | 224 | #define SPI_BaudRatePrescaler_64 ((uint16_t)0x0028) |
mbed_official | 126:549ba18ddd81 | 225 | #define SPI_BaudRatePrescaler_128 ((uint16_t)0x0030) |
mbed_official | 126:549ba18ddd81 | 226 | #define SPI_BaudRatePrescaler_256 ((uint16_t)0x0038) |
mbed_official | 126:549ba18ddd81 | 227 | #define IS_SPI_BAUDRATE_PRESCALER(PRESCALER) (((PRESCALER) == SPI_BaudRatePrescaler_2) || \ |
mbed_official | 126:549ba18ddd81 | 228 | ((PRESCALER) == SPI_BaudRatePrescaler_4) || \ |
mbed_official | 126:549ba18ddd81 | 229 | ((PRESCALER) == SPI_BaudRatePrescaler_8) || \ |
mbed_official | 126:549ba18ddd81 | 230 | ((PRESCALER) == SPI_BaudRatePrescaler_16) || \ |
mbed_official | 126:549ba18ddd81 | 231 | ((PRESCALER) == SPI_BaudRatePrescaler_32) || \ |
mbed_official | 126:549ba18ddd81 | 232 | ((PRESCALER) == SPI_BaudRatePrescaler_64) || \ |
mbed_official | 126:549ba18ddd81 | 233 | ((PRESCALER) == SPI_BaudRatePrescaler_128) || \ |
mbed_official | 126:549ba18ddd81 | 234 | ((PRESCALER) == SPI_BaudRatePrescaler_256)) |
mbed_official | 126:549ba18ddd81 | 235 | /** |
mbed_official | 126:549ba18ddd81 | 236 | * @} |
mbed_official | 126:549ba18ddd81 | 237 | */ |
mbed_official | 126:549ba18ddd81 | 238 | |
mbed_official | 126:549ba18ddd81 | 239 | /** @defgroup SPI_MSB_LSB_transmission |
mbed_official | 126:549ba18ddd81 | 240 | * @{ |
mbed_official | 126:549ba18ddd81 | 241 | */ |
mbed_official | 126:549ba18ddd81 | 242 | |
mbed_official | 126:549ba18ddd81 | 243 | #define SPI_FirstBit_MSB ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 244 | #define SPI_FirstBit_LSB ((uint16_t)0x0080) |
mbed_official | 126:549ba18ddd81 | 245 | #define IS_SPI_FIRST_BIT(BIT) (((BIT) == SPI_FirstBit_MSB) || \ |
mbed_official | 126:549ba18ddd81 | 246 | ((BIT) == SPI_FirstBit_LSB)) |
mbed_official | 126:549ba18ddd81 | 247 | /** |
mbed_official | 126:549ba18ddd81 | 248 | * @} |
mbed_official | 126:549ba18ddd81 | 249 | */ |
mbed_official | 126:549ba18ddd81 | 250 | |
mbed_official | 126:549ba18ddd81 | 251 | /** @defgroup I2S_Mode |
mbed_official | 126:549ba18ddd81 | 252 | * @{ |
mbed_official | 126:549ba18ddd81 | 253 | */ |
mbed_official | 126:549ba18ddd81 | 254 | |
mbed_official | 126:549ba18ddd81 | 255 | #define I2S_Mode_SlaveTx ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 256 | #define I2S_Mode_SlaveRx ((uint16_t)0x0100) |
mbed_official | 126:549ba18ddd81 | 257 | #define I2S_Mode_MasterTx ((uint16_t)0x0200) |
mbed_official | 126:549ba18ddd81 | 258 | #define I2S_Mode_MasterRx ((uint16_t)0x0300) |
mbed_official | 126:549ba18ddd81 | 259 | #define IS_I2S_MODE(MODE) (((MODE) == I2S_Mode_SlaveTx) || \ |
mbed_official | 126:549ba18ddd81 | 260 | ((MODE) == I2S_Mode_SlaveRx) || \ |
mbed_official | 126:549ba18ddd81 | 261 | ((MODE) == I2S_Mode_MasterTx) || \ |
mbed_official | 126:549ba18ddd81 | 262 | ((MODE) == I2S_Mode_MasterRx) ) |
mbed_official | 126:549ba18ddd81 | 263 | /** |
mbed_official | 126:549ba18ddd81 | 264 | * @} |
mbed_official | 126:549ba18ddd81 | 265 | */ |
mbed_official | 126:549ba18ddd81 | 266 | |
mbed_official | 126:549ba18ddd81 | 267 | /** @defgroup I2S_Standard |
mbed_official | 126:549ba18ddd81 | 268 | * @{ |
mbed_official | 126:549ba18ddd81 | 269 | */ |
mbed_official | 126:549ba18ddd81 | 270 | |
mbed_official | 126:549ba18ddd81 | 271 | #define I2S_Standard_Phillips ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 272 | #define I2S_Standard_MSB ((uint16_t)0x0010) |
mbed_official | 126:549ba18ddd81 | 273 | #define I2S_Standard_LSB ((uint16_t)0x0020) |
mbed_official | 126:549ba18ddd81 | 274 | #define I2S_Standard_PCMShort ((uint16_t)0x0030) |
mbed_official | 126:549ba18ddd81 | 275 | #define I2S_Standard_PCMLong ((uint16_t)0x00B0) |
mbed_official | 126:549ba18ddd81 | 276 | #define IS_I2S_STANDARD(STANDARD) (((STANDARD) == I2S_Standard_Phillips) || \ |
mbed_official | 126:549ba18ddd81 | 277 | ((STANDARD) == I2S_Standard_MSB) || \ |
mbed_official | 126:549ba18ddd81 | 278 | ((STANDARD) == I2S_Standard_LSB) || \ |
mbed_official | 126:549ba18ddd81 | 279 | ((STANDARD) == I2S_Standard_PCMShort) || \ |
mbed_official | 126:549ba18ddd81 | 280 | ((STANDARD) == I2S_Standard_PCMLong)) |
mbed_official | 126:549ba18ddd81 | 281 | /** |
mbed_official | 126:549ba18ddd81 | 282 | * @} |
mbed_official | 126:549ba18ddd81 | 283 | */ |
mbed_official | 126:549ba18ddd81 | 284 | |
mbed_official | 126:549ba18ddd81 | 285 | /** @defgroup I2S_Data_Format |
mbed_official | 126:549ba18ddd81 | 286 | * @{ |
mbed_official | 126:549ba18ddd81 | 287 | */ |
mbed_official | 126:549ba18ddd81 | 288 | |
mbed_official | 126:549ba18ddd81 | 289 | #define I2S_DataFormat_16b ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 290 | #define I2S_DataFormat_16bextended ((uint16_t)0x0001) |
mbed_official | 126:549ba18ddd81 | 291 | #define I2S_DataFormat_24b ((uint16_t)0x0003) |
mbed_official | 126:549ba18ddd81 | 292 | #define I2S_DataFormat_32b ((uint16_t)0x0005) |
mbed_official | 126:549ba18ddd81 | 293 | #define IS_I2S_DATA_FORMAT(FORMAT) (((FORMAT) == I2S_DataFormat_16b) || \ |
mbed_official | 126:549ba18ddd81 | 294 | ((FORMAT) == I2S_DataFormat_16bextended) || \ |
mbed_official | 126:549ba18ddd81 | 295 | ((FORMAT) == I2S_DataFormat_24b) || \ |
mbed_official | 126:549ba18ddd81 | 296 | ((FORMAT) == I2S_DataFormat_32b)) |
mbed_official | 126:549ba18ddd81 | 297 | /** |
mbed_official | 126:549ba18ddd81 | 298 | * @} |
mbed_official | 126:549ba18ddd81 | 299 | */ |
mbed_official | 126:549ba18ddd81 | 300 | |
mbed_official | 126:549ba18ddd81 | 301 | /** @defgroup I2S_MCLK_Output |
mbed_official | 126:549ba18ddd81 | 302 | * @{ |
mbed_official | 126:549ba18ddd81 | 303 | */ |
mbed_official | 126:549ba18ddd81 | 304 | |
mbed_official | 126:549ba18ddd81 | 305 | #define I2S_MCLKOutput_Enable ((uint16_t)0x0200) |
mbed_official | 126:549ba18ddd81 | 306 | #define I2S_MCLKOutput_Disable ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 307 | #define IS_I2S_MCLK_OUTPUT(OUTPUT) (((OUTPUT) == I2S_MCLKOutput_Enable) || \ |
mbed_official | 126:549ba18ddd81 | 308 | ((OUTPUT) == I2S_MCLKOutput_Disable)) |
mbed_official | 126:549ba18ddd81 | 309 | /** |
mbed_official | 126:549ba18ddd81 | 310 | * @} |
mbed_official | 126:549ba18ddd81 | 311 | */ |
mbed_official | 126:549ba18ddd81 | 312 | |
mbed_official | 126:549ba18ddd81 | 313 | /** @defgroup I2S_Audio_Frequency |
mbed_official | 126:549ba18ddd81 | 314 | * @{ |
mbed_official | 126:549ba18ddd81 | 315 | */ |
mbed_official | 126:549ba18ddd81 | 316 | |
mbed_official | 126:549ba18ddd81 | 317 | #define I2S_AudioFreq_192k ((uint32_t)192000) |
mbed_official | 126:549ba18ddd81 | 318 | #define I2S_AudioFreq_96k ((uint32_t)96000) |
mbed_official | 126:549ba18ddd81 | 319 | #define I2S_AudioFreq_48k ((uint32_t)48000) |
mbed_official | 126:549ba18ddd81 | 320 | #define I2S_AudioFreq_44k ((uint32_t)44100) |
mbed_official | 126:549ba18ddd81 | 321 | #define I2S_AudioFreq_32k ((uint32_t)32000) |
mbed_official | 126:549ba18ddd81 | 322 | #define I2S_AudioFreq_22k ((uint32_t)22050) |
mbed_official | 126:549ba18ddd81 | 323 | #define I2S_AudioFreq_16k ((uint32_t)16000) |
mbed_official | 126:549ba18ddd81 | 324 | #define I2S_AudioFreq_11k ((uint32_t)11025) |
mbed_official | 126:549ba18ddd81 | 325 | #define I2S_AudioFreq_8k ((uint32_t)8000) |
mbed_official | 126:549ba18ddd81 | 326 | #define I2S_AudioFreq_Default ((uint32_t)2) |
mbed_official | 126:549ba18ddd81 | 327 | |
mbed_official | 126:549ba18ddd81 | 328 | #define IS_I2S_AUDIO_FREQ(FREQ) ((((FREQ) >= I2S_AudioFreq_8k) && \ |
mbed_official | 126:549ba18ddd81 | 329 | ((FREQ) <= I2S_AudioFreq_192k)) || \ |
mbed_official | 126:549ba18ddd81 | 330 | ((FREQ) == I2S_AudioFreq_Default)) |
mbed_official | 126:549ba18ddd81 | 331 | /** |
mbed_official | 126:549ba18ddd81 | 332 | * @} |
mbed_official | 126:549ba18ddd81 | 333 | */ |
mbed_official | 126:549ba18ddd81 | 334 | |
mbed_official | 126:549ba18ddd81 | 335 | /** @defgroup I2S_Clock_Polarity |
mbed_official | 126:549ba18ddd81 | 336 | * @{ |
mbed_official | 126:549ba18ddd81 | 337 | */ |
mbed_official | 126:549ba18ddd81 | 338 | |
mbed_official | 126:549ba18ddd81 | 339 | #define I2S_CPOL_Low ((uint16_t)0x0000) |
mbed_official | 126:549ba18ddd81 | 340 | #define I2S_CPOL_High ((uint16_t)0x0008) |
mbed_official | 126:549ba18ddd81 | 341 | #define IS_I2S_CPOL(CPOL) (((CPOL) == I2S_CPOL_Low) || \ |
mbed_official | 126:549ba18ddd81 | 342 | ((CPOL) == I2S_CPOL_High)) |
mbed_official | 126:549ba18ddd81 | 343 | /** |
mbed_official | 126:549ba18ddd81 | 344 | * @} |
mbed_official | 126:549ba18ddd81 | 345 | */ |
mbed_official | 126:549ba18ddd81 | 346 | |
mbed_official | 126:549ba18ddd81 | 347 | /** @defgroup SPI_I2S_DMA_transfer_requests |
mbed_official | 126:549ba18ddd81 | 348 | * @{ |
mbed_official | 126:549ba18ddd81 | 349 | */ |
mbed_official | 126:549ba18ddd81 | 350 | |
mbed_official | 126:549ba18ddd81 | 351 | #define SPI_I2S_DMAReq_Tx ((uint16_t)0x0002) |
mbed_official | 126:549ba18ddd81 | 352 | #define SPI_I2S_DMAReq_Rx ((uint16_t)0x0001) |
mbed_official | 126:549ba18ddd81 | 353 | #define IS_SPI_I2S_DMAREQ(DMAREQ) ((((DMAREQ) & (uint16_t)0xFFFC) == 0x00) && ((DMAREQ) != 0x00)) |
mbed_official | 126:549ba18ddd81 | 354 | /** |
mbed_official | 126:549ba18ddd81 | 355 | * @} |
mbed_official | 126:549ba18ddd81 | 356 | */ |
mbed_official | 126:549ba18ddd81 | 357 | |
mbed_official | 126:549ba18ddd81 | 358 | /** @defgroup SPI_NSS_internal_software_management |
mbed_official | 126:549ba18ddd81 | 359 | * @{ |
mbed_official | 126:549ba18ddd81 | 360 | */ |
mbed_official | 126:549ba18ddd81 | 361 | |
mbed_official | 126:549ba18ddd81 | 362 | #define SPI_NSSInternalSoft_Set ((uint16_t)0x0100) |
mbed_official | 126:549ba18ddd81 | 363 | #define SPI_NSSInternalSoft_Reset ((uint16_t)0xFEFF) |
mbed_official | 126:549ba18ddd81 | 364 | #define IS_SPI_NSS_INTERNAL(INTERNAL) (((INTERNAL) == SPI_NSSInternalSoft_Set) || \ |
mbed_official | 126:549ba18ddd81 | 365 | ((INTERNAL) == SPI_NSSInternalSoft_Reset)) |
mbed_official | 126:549ba18ddd81 | 366 | /** |
mbed_official | 126:549ba18ddd81 | 367 | * @} |
mbed_official | 126:549ba18ddd81 | 368 | */ |
mbed_official | 126:549ba18ddd81 | 369 | |
mbed_official | 126:549ba18ddd81 | 370 | /** @defgroup SPI_CRC_Transmit_Receive |
mbed_official | 126:549ba18ddd81 | 371 | * @{ |
mbed_official | 126:549ba18ddd81 | 372 | */ |
mbed_official | 126:549ba18ddd81 | 373 | |
mbed_official | 126:549ba18ddd81 | 374 | #define SPI_CRC_Tx ((uint8_t)0x00) |
mbed_official | 126:549ba18ddd81 | 375 | #define SPI_CRC_Rx ((uint8_t)0x01) |
mbed_official | 126:549ba18ddd81 | 376 | #define IS_SPI_CRC(CRC) (((CRC) == SPI_CRC_Tx) || ((CRC) == SPI_CRC_Rx)) |
mbed_official | 126:549ba18ddd81 | 377 | /** |
mbed_official | 126:549ba18ddd81 | 378 | * @} |
mbed_official | 126:549ba18ddd81 | 379 | */ |
mbed_official | 126:549ba18ddd81 | 380 | |
mbed_official | 126:549ba18ddd81 | 381 | /** @defgroup SPI_direction_transmit_receive |
mbed_official | 126:549ba18ddd81 | 382 | * @{ |
mbed_official | 126:549ba18ddd81 | 383 | */ |
mbed_official | 126:549ba18ddd81 | 384 | |
mbed_official | 126:549ba18ddd81 | 385 | #define SPI_Direction_Rx ((uint16_t)0xBFFF) |
mbed_official | 126:549ba18ddd81 | 386 | #define SPI_Direction_Tx ((uint16_t)0x4000) |
mbed_official | 126:549ba18ddd81 | 387 | #define IS_SPI_DIRECTION(DIRECTION) (((DIRECTION) == SPI_Direction_Rx) || \ |
mbed_official | 126:549ba18ddd81 | 388 | ((DIRECTION) == SPI_Direction_Tx)) |
mbed_official | 126:549ba18ddd81 | 389 | /** |
mbed_official | 126:549ba18ddd81 | 390 | * @} |
mbed_official | 126:549ba18ddd81 | 391 | */ |
mbed_official | 126:549ba18ddd81 | 392 | |
mbed_official | 126:549ba18ddd81 | 393 | /** @defgroup SPI_I2S_interrupts_definition |
mbed_official | 126:549ba18ddd81 | 394 | * @{ |
mbed_official | 126:549ba18ddd81 | 395 | */ |
mbed_official | 126:549ba18ddd81 | 396 | |
mbed_official | 126:549ba18ddd81 | 397 | #define SPI_I2S_IT_TXE ((uint8_t)0x71) |
mbed_official | 126:549ba18ddd81 | 398 | #define SPI_I2S_IT_RXNE ((uint8_t)0x60) |
mbed_official | 126:549ba18ddd81 | 399 | #define SPI_I2S_IT_ERR ((uint8_t)0x50) |
mbed_official | 126:549ba18ddd81 | 400 | #define IS_SPI_I2S_CONFIG_IT(IT) (((IT) == SPI_I2S_IT_TXE) || \ |
mbed_official | 126:549ba18ddd81 | 401 | ((IT) == SPI_I2S_IT_RXNE) || \ |
mbed_official | 126:549ba18ddd81 | 402 | ((IT) == SPI_I2S_IT_ERR)) |
mbed_official | 126:549ba18ddd81 | 403 | #define SPI_I2S_IT_OVR ((uint8_t)0x56) |
mbed_official | 126:549ba18ddd81 | 404 | #define SPI_IT_MODF ((uint8_t)0x55) |
mbed_official | 126:549ba18ddd81 | 405 | #define SPI_IT_CRCERR ((uint8_t)0x54) |
mbed_official | 126:549ba18ddd81 | 406 | #define I2S_IT_UDR ((uint8_t)0x53) |
mbed_official | 126:549ba18ddd81 | 407 | #define IS_SPI_I2S_CLEAR_IT(IT) (((IT) == SPI_IT_CRCERR)) |
mbed_official | 126:549ba18ddd81 | 408 | #define IS_SPI_I2S_GET_IT(IT) (((IT) == SPI_I2S_IT_RXNE) || ((IT) == SPI_I2S_IT_TXE) || \ |
mbed_official | 126:549ba18ddd81 | 409 | ((IT) == I2S_IT_UDR) || ((IT) == SPI_IT_CRCERR) || \ |
mbed_official | 126:549ba18ddd81 | 410 | ((IT) == SPI_IT_MODF) || ((IT) == SPI_I2S_IT_OVR)) |
mbed_official | 126:549ba18ddd81 | 411 | /** |
mbed_official | 126:549ba18ddd81 | 412 | * @} |
mbed_official | 126:549ba18ddd81 | 413 | */ |
mbed_official | 126:549ba18ddd81 | 414 | |
mbed_official | 126:549ba18ddd81 | 415 | /** @defgroup SPI_I2S_flags_definition |
mbed_official | 126:549ba18ddd81 | 416 | * @{ |
mbed_official | 126:549ba18ddd81 | 417 | */ |
mbed_official | 126:549ba18ddd81 | 418 | |
mbed_official | 126:549ba18ddd81 | 419 | #define SPI_I2S_FLAG_RXNE ((uint16_t)0x0001) |
mbed_official | 126:549ba18ddd81 | 420 | #define SPI_I2S_FLAG_TXE ((uint16_t)0x0002) |
mbed_official | 126:549ba18ddd81 | 421 | #define I2S_FLAG_CHSIDE ((uint16_t)0x0004) |
mbed_official | 126:549ba18ddd81 | 422 | #define I2S_FLAG_UDR ((uint16_t)0x0008) |
mbed_official | 126:549ba18ddd81 | 423 | #define SPI_FLAG_CRCERR ((uint16_t)0x0010) |
mbed_official | 126:549ba18ddd81 | 424 | #define SPI_FLAG_MODF ((uint16_t)0x0020) |
mbed_official | 126:549ba18ddd81 | 425 | #define SPI_I2S_FLAG_OVR ((uint16_t)0x0040) |
mbed_official | 126:549ba18ddd81 | 426 | #define SPI_I2S_FLAG_BSY ((uint16_t)0x0080) |
mbed_official | 126:549ba18ddd81 | 427 | #define IS_SPI_I2S_CLEAR_FLAG(FLAG) (((FLAG) == SPI_FLAG_CRCERR)) |
mbed_official | 126:549ba18ddd81 | 428 | #define IS_SPI_I2S_GET_FLAG(FLAG) (((FLAG) == SPI_I2S_FLAG_BSY) || ((FLAG) == SPI_I2S_FLAG_OVR) || \ |
mbed_official | 126:549ba18ddd81 | 429 | ((FLAG) == SPI_FLAG_MODF) || ((FLAG) == SPI_FLAG_CRCERR) || \ |
mbed_official | 126:549ba18ddd81 | 430 | ((FLAG) == I2S_FLAG_UDR) || ((FLAG) == I2S_FLAG_CHSIDE) || \ |
mbed_official | 126:549ba18ddd81 | 431 | ((FLAG) == SPI_I2S_FLAG_TXE) || ((FLAG) == SPI_I2S_FLAG_RXNE)) |
mbed_official | 126:549ba18ddd81 | 432 | /** |
mbed_official | 126:549ba18ddd81 | 433 | * @} |
mbed_official | 126:549ba18ddd81 | 434 | */ |
mbed_official | 126:549ba18ddd81 | 435 | |
mbed_official | 126:549ba18ddd81 | 436 | /** @defgroup SPI_CRC_polynomial |
mbed_official | 126:549ba18ddd81 | 437 | * @{ |
mbed_official | 126:549ba18ddd81 | 438 | */ |
mbed_official | 126:549ba18ddd81 | 439 | |
mbed_official | 126:549ba18ddd81 | 440 | #define IS_SPI_CRC_POLYNOMIAL(POLYNOMIAL) ((POLYNOMIAL) >= 0x1) |
mbed_official | 126:549ba18ddd81 | 441 | /** |
mbed_official | 126:549ba18ddd81 | 442 | * @} |
mbed_official | 126:549ba18ddd81 | 443 | */ |
mbed_official | 126:549ba18ddd81 | 444 | |
mbed_official | 126:549ba18ddd81 | 445 | /** |
mbed_official | 126:549ba18ddd81 | 446 | * @} |
mbed_official | 126:549ba18ddd81 | 447 | */ |
mbed_official | 126:549ba18ddd81 | 448 | |
mbed_official | 126:549ba18ddd81 | 449 | /** @defgroup SPI_Exported_Macros |
mbed_official | 126:549ba18ddd81 | 450 | * @{ |
mbed_official | 126:549ba18ddd81 | 451 | */ |
mbed_official | 126:549ba18ddd81 | 452 | |
mbed_official | 126:549ba18ddd81 | 453 | /** |
mbed_official | 126:549ba18ddd81 | 454 | * @} |
mbed_official | 126:549ba18ddd81 | 455 | */ |
mbed_official | 126:549ba18ddd81 | 456 | |
mbed_official | 126:549ba18ddd81 | 457 | /** @defgroup SPI_Exported_Functions |
mbed_official | 126:549ba18ddd81 | 458 | * @{ |
mbed_official | 126:549ba18ddd81 | 459 | */ |
mbed_official | 126:549ba18ddd81 | 460 | |
mbed_official | 126:549ba18ddd81 | 461 | void SPI_I2S_DeInit(SPI_TypeDef* SPIx); |
mbed_official | 126:549ba18ddd81 | 462 | void SPI_Init(SPI_TypeDef* SPIx, SPI_InitTypeDef* SPI_InitStruct); |
mbed_official | 126:549ba18ddd81 | 463 | void I2S_Init(SPI_TypeDef* SPIx, I2S_InitTypeDef* I2S_InitStruct); |
mbed_official | 126:549ba18ddd81 | 464 | void SPI_StructInit(SPI_InitTypeDef* SPI_InitStruct); |
mbed_official | 126:549ba18ddd81 | 465 | void I2S_StructInit(I2S_InitTypeDef* I2S_InitStruct); |
mbed_official | 126:549ba18ddd81 | 466 | void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 467 | void I2S_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 468 | void SPI_I2S_ITConfig(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT, FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 469 | void SPI_I2S_DMACmd(SPI_TypeDef* SPIx, uint16_t SPI_I2S_DMAReq, FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 470 | void SPI_I2S_SendData(SPI_TypeDef* SPIx, uint16_t Data); |
mbed_official | 126:549ba18ddd81 | 471 | uint16_t SPI_I2S_ReceiveData(SPI_TypeDef* SPIx); |
mbed_official | 126:549ba18ddd81 | 472 | void SPI_NSSInternalSoftwareConfig(SPI_TypeDef* SPIx, uint16_t SPI_NSSInternalSoft); |
mbed_official | 126:549ba18ddd81 | 473 | void SPI_SSOutputCmd(SPI_TypeDef* SPIx, FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 474 | void SPI_DataSizeConfig(SPI_TypeDef* SPIx, uint16_t SPI_DataSize); |
mbed_official | 126:549ba18ddd81 | 475 | void SPI_TransmitCRC(SPI_TypeDef* SPIx); |
mbed_official | 126:549ba18ddd81 | 476 | void SPI_CalculateCRC(SPI_TypeDef* SPIx, FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 477 | uint16_t SPI_GetCRC(SPI_TypeDef* SPIx, uint8_t SPI_CRC); |
mbed_official | 126:549ba18ddd81 | 478 | uint16_t SPI_GetCRCPolynomial(SPI_TypeDef* SPIx); |
mbed_official | 126:549ba18ddd81 | 479 | void SPI_BiDirectionalLineConfig(SPI_TypeDef* SPIx, uint16_t SPI_Direction); |
mbed_official | 126:549ba18ddd81 | 480 | FlagStatus SPI_I2S_GetFlagStatus(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG); |
mbed_official | 126:549ba18ddd81 | 481 | void SPI_I2S_ClearFlag(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG); |
mbed_official | 126:549ba18ddd81 | 482 | ITStatus SPI_I2S_GetITStatus(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT); |
mbed_official | 126:549ba18ddd81 | 483 | void SPI_I2S_ClearITPendingBit(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT); |
mbed_official | 126:549ba18ddd81 | 484 | |
mbed_official | 126:549ba18ddd81 | 485 | #ifdef __cplusplus |
mbed_official | 126:549ba18ddd81 | 486 | } |
mbed_official | 126:549ba18ddd81 | 487 | #endif |
mbed_official | 126:549ba18ddd81 | 488 | |
mbed_official | 126:549ba18ddd81 | 489 | #endif /*__STM32F10x_SPI_H */ |
mbed_official | 126:549ba18ddd81 | 490 | /** |
mbed_official | 126:549ba18ddd81 | 491 | * @} |
mbed_official | 126:549ba18ddd81 | 492 | */ |
mbed_official | 126:549ba18ddd81 | 493 | |
mbed_official | 126:549ba18ddd81 | 494 | /** |
mbed_official | 126:549ba18ddd81 | 495 | * @} |
mbed_official | 126:549ba18ddd81 | 496 | */ |
mbed_official | 126:549ba18ddd81 | 497 | |
mbed_official | 126:549ba18ddd81 | 498 | /** |
mbed_official | 126:549ba18ddd81 | 499 | * @} |
mbed_official | 126:549ba18ddd81 | 500 | */ |
mbed_official | 126:549ba18ddd81 | 501 | |
mbed_official | 126:549ba18ddd81 | 502 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |