mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F411RE/stm32f4xx_hal_spi.h@310:6188e0254baa, 2014-09-16 (annotated)
- Committer:
- janekm
- Date:
- Tue Sep 16 22:42:01 2014 +0000
- Revision:
- 310:6188e0254baa
- Parent:
- 235:685d5f11838f
N/A
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 235:685d5f11838f | 1 | /** |
mbed_official | 235:685d5f11838f | 2 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 3 | * @file stm32f4xx_hal_spi.h |
mbed_official | 235:685d5f11838f | 4 | * @author MCD Application Team |
mbed_official | 235:685d5f11838f | 5 | * @version V1.1.0 |
mbed_official | 235:685d5f11838f | 6 | * @date 19-June-2014 |
mbed_official | 235:685d5f11838f | 7 | * @brief Header file of SPI HAL module. |
mbed_official | 235:685d5f11838f | 8 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 9 | * @attention |
mbed_official | 235:685d5f11838f | 10 | * |
mbed_official | 235:685d5f11838f | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 235:685d5f11838f | 12 | * |
mbed_official | 235:685d5f11838f | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 235:685d5f11838f | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 235:685d5f11838f | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 235:685d5f11838f | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 235:685d5f11838f | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 235:685d5f11838f | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 235:685d5f11838f | 19 | * and/or other materials provided with the distribution. |
mbed_official | 235:685d5f11838f | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 235:685d5f11838f | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 235:685d5f11838f | 22 | * without specific prior written permission. |
mbed_official | 235:685d5f11838f | 23 | * |
mbed_official | 235:685d5f11838f | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 235:685d5f11838f | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 235:685d5f11838f | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 235:685d5f11838f | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 235:685d5f11838f | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 235:685d5f11838f | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 235:685d5f11838f | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 235:685d5f11838f | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 235:685d5f11838f | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 235:685d5f11838f | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 235:685d5f11838f | 34 | * |
mbed_official | 235:685d5f11838f | 35 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 36 | */ |
mbed_official | 235:685d5f11838f | 37 | |
mbed_official | 235:685d5f11838f | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 235:685d5f11838f | 39 | #ifndef __STM32F4xx_HAL_SPI_H |
mbed_official | 235:685d5f11838f | 40 | #define __STM32F4xx_HAL_SPI_H |
mbed_official | 235:685d5f11838f | 41 | |
mbed_official | 235:685d5f11838f | 42 | #ifdef __cplusplus |
mbed_official | 235:685d5f11838f | 43 | extern "C" { |
mbed_official | 235:685d5f11838f | 44 | #endif |
mbed_official | 235:685d5f11838f | 45 | |
mbed_official | 235:685d5f11838f | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 47 | #include "stm32f4xx_hal_def.h" |
mbed_official | 235:685d5f11838f | 48 | |
mbed_official | 235:685d5f11838f | 49 | /** @addtogroup STM32F4xx_HAL_Driver |
mbed_official | 235:685d5f11838f | 50 | * @{ |
mbed_official | 235:685d5f11838f | 51 | */ |
mbed_official | 235:685d5f11838f | 52 | |
mbed_official | 235:685d5f11838f | 53 | /** @addtogroup SPI |
mbed_official | 235:685d5f11838f | 54 | * @{ |
mbed_official | 235:685d5f11838f | 55 | */ |
mbed_official | 235:685d5f11838f | 56 | |
mbed_official | 235:685d5f11838f | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 58 | |
mbed_official | 235:685d5f11838f | 59 | /** |
mbed_official | 235:685d5f11838f | 60 | * @brief SPI Configuration Structure definition |
mbed_official | 235:685d5f11838f | 61 | */ |
mbed_official | 235:685d5f11838f | 62 | typedef struct |
mbed_official | 235:685d5f11838f | 63 | { |
mbed_official | 235:685d5f11838f | 64 | uint32_t Mode; /*!< Specifies the SPI operating mode. |
mbed_official | 235:685d5f11838f | 65 | This parameter can be a value of @ref SPI_mode */ |
mbed_official | 235:685d5f11838f | 66 | |
mbed_official | 235:685d5f11838f | 67 | uint32_t Direction; /*!< Specifies the SPI Directional mode state. |
mbed_official | 235:685d5f11838f | 68 | This parameter can be a value of @ref SPI_Direction_mode */ |
mbed_official | 235:685d5f11838f | 69 | |
mbed_official | 235:685d5f11838f | 70 | uint32_t DataSize; /*!< Specifies the SPI data size. |
mbed_official | 235:685d5f11838f | 71 | This parameter can be a value of @ref SPI_data_size */ |
mbed_official | 235:685d5f11838f | 72 | |
mbed_official | 235:685d5f11838f | 73 | uint32_t CLKPolarity; /*!< Specifies the serial clock steady state. |
mbed_official | 235:685d5f11838f | 74 | This parameter can be a value of @ref SPI_Clock_Polarity */ |
mbed_official | 235:685d5f11838f | 75 | |
mbed_official | 235:685d5f11838f | 76 | uint32_t CLKPhase; /*!< Specifies the clock active edge for the bit capture. |
mbed_official | 235:685d5f11838f | 77 | This parameter can be a value of @ref SPI_Clock_Phase */ |
mbed_official | 235:685d5f11838f | 78 | |
mbed_official | 235:685d5f11838f | 79 | uint32_t NSS; /*!< Specifies whether the NSS signal is managed by |
mbed_official | 235:685d5f11838f | 80 | hardware (NSS pin) or by software using the SSI bit. |
mbed_official | 235:685d5f11838f | 81 | This parameter can be a value of @ref SPI_Slave_Select_management */ |
mbed_official | 235:685d5f11838f | 82 | |
mbed_official | 235:685d5f11838f | 83 | uint32_t BaudRatePrescaler; /*!< Specifies the Baud Rate prescaler value which will be |
mbed_official | 235:685d5f11838f | 84 | used to configure the transmit and receive SCK clock. |
mbed_official | 235:685d5f11838f | 85 | This parameter can be a value of @ref SPI_BaudRate_Prescaler |
mbed_official | 235:685d5f11838f | 86 | @note The communication clock is derived from the master |
mbed_official | 235:685d5f11838f | 87 | clock. The slave clock does not need to be set */ |
mbed_official | 235:685d5f11838f | 88 | |
mbed_official | 235:685d5f11838f | 89 | uint32_t FirstBit; /*!< Specifies whether data transfers start from MSB or LSB bit. |
mbed_official | 235:685d5f11838f | 90 | This parameter can be a value of @ref SPI_MSB_LSB_transmission */ |
mbed_official | 235:685d5f11838f | 91 | |
mbed_official | 235:685d5f11838f | 92 | uint32_t TIMode; /*!< Specifies if the TI mode is enabled or not. |
mbed_official | 235:685d5f11838f | 93 | This parameter can be a value of @ref SPI_TI_mode */ |
mbed_official | 235:685d5f11838f | 94 | |
mbed_official | 235:685d5f11838f | 95 | uint32_t CRCCalculation; /*!< Specifies if the CRC calculation is enabled or not. |
mbed_official | 235:685d5f11838f | 96 | This parameter can be a value of @ref SPI_CRC_Calculation */ |
mbed_official | 235:685d5f11838f | 97 | |
mbed_official | 235:685d5f11838f | 98 | uint32_t CRCPolynomial; /*!< Specifies the polynomial used for the CRC calculation. |
mbed_official | 235:685d5f11838f | 99 | This parameter must be a number between Min_Data = 0 and Max_Data = 65535 */ |
mbed_official | 235:685d5f11838f | 100 | |
mbed_official | 235:685d5f11838f | 101 | }SPI_InitTypeDef; |
mbed_official | 235:685d5f11838f | 102 | |
mbed_official | 235:685d5f11838f | 103 | /** |
mbed_official | 235:685d5f11838f | 104 | * @brief HAL SPI State structure definition |
mbed_official | 235:685d5f11838f | 105 | */ |
mbed_official | 235:685d5f11838f | 106 | typedef enum |
mbed_official | 235:685d5f11838f | 107 | { |
mbed_official | 235:685d5f11838f | 108 | HAL_SPI_STATE_RESET = 0x00, /*!< SPI not yet initialized or disabled */ |
mbed_official | 235:685d5f11838f | 109 | HAL_SPI_STATE_READY = 0x01, /*!< SPI initialized and ready for use */ |
mbed_official | 235:685d5f11838f | 110 | HAL_SPI_STATE_BUSY = 0x02, /*!< SPI process is ongoing */ |
mbed_official | 235:685d5f11838f | 111 | HAL_SPI_STATE_BUSY_TX = 0x12, /*!< Data Transmission process is ongoing */ |
mbed_official | 235:685d5f11838f | 112 | HAL_SPI_STATE_BUSY_RX = 0x22, /*!< Data Reception process is ongoing */ |
mbed_official | 235:685d5f11838f | 113 | HAL_SPI_STATE_BUSY_TX_RX = 0x32, /*!< Data Transmission and Reception process is ongoing */ |
mbed_official | 235:685d5f11838f | 114 | HAL_SPI_STATE_ERROR = 0x03 /*!< SPI error state */ |
mbed_official | 235:685d5f11838f | 115 | |
mbed_official | 235:685d5f11838f | 116 | }HAL_SPI_StateTypeDef; |
mbed_official | 235:685d5f11838f | 117 | |
mbed_official | 235:685d5f11838f | 118 | /** |
mbed_official | 235:685d5f11838f | 119 | * @brief HAL SPI Error Code structure definition |
mbed_official | 235:685d5f11838f | 120 | */ |
mbed_official | 235:685d5f11838f | 121 | typedef enum |
mbed_official | 235:685d5f11838f | 122 | { |
mbed_official | 235:685d5f11838f | 123 | HAL_SPI_ERROR_NONE = 0x00, /*!< No error */ |
mbed_official | 235:685d5f11838f | 124 | HAL_SPI_ERROR_MODF = 0x01, /*!< MODF error */ |
mbed_official | 235:685d5f11838f | 125 | HAL_SPI_ERROR_CRC = 0x02, /*!< CRC error */ |
mbed_official | 235:685d5f11838f | 126 | HAL_SPI_ERROR_OVR = 0x04, /*!< OVR error */ |
mbed_official | 235:685d5f11838f | 127 | HAL_SPI_ERROR_FRE = 0x08, /*!< FRE error */ |
mbed_official | 235:685d5f11838f | 128 | HAL_SPI_ERROR_DMA = 0x10, /*!< DMA transfer error */ |
mbed_official | 235:685d5f11838f | 129 | HAL_SPI_ERROR_FLAG = 0x20 /*!< Flag: RXNE,TXE, BSY */ |
mbed_official | 235:685d5f11838f | 130 | |
mbed_official | 235:685d5f11838f | 131 | }HAL_SPI_ErrorTypeDef; |
mbed_official | 235:685d5f11838f | 132 | |
mbed_official | 235:685d5f11838f | 133 | /** |
mbed_official | 235:685d5f11838f | 134 | * @brief SPI handle Structure definition |
mbed_official | 235:685d5f11838f | 135 | */ |
mbed_official | 235:685d5f11838f | 136 | typedef struct __SPI_HandleTypeDef |
mbed_official | 235:685d5f11838f | 137 | { |
mbed_official | 235:685d5f11838f | 138 | SPI_TypeDef *Instance; /* SPI registers base address */ |
mbed_official | 235:685d5f11838f | 139 | |
mbed_official | 235:685d5f11838f | 140 | SPI_InitTypeDef Init; /* SPI communication parameters */ |
mbed_official | 235:685d5f11838f | 141 | |
mbed_official | 235:685d5f11838f | 142 | uint8_t *pTxBuffPtr; /* Pointer to SPI Tx transfer Buffer */ |
mbed_official | 235:685d5f11838f | 143 | |
mbed_official | 235:685d5f11838f | 144 | uint16_t TxXferSize; /* SPI Tx transfer size */ |
mbed_official | 235:685d5f11838f | 145 | |
mbed_official | 235:685d5f11838f | 146 | uint16_t TxXferCount; /* SPI Tx Transfer Counter */ |
mbed_official | 235:685d5f11838f | 147 | |
mbed_official | 235:685d5f11838f | 148 | uint8_t *pRxBuffPtr; /* Pointer to SPI Rx transfer Buffer */ |
mbed_official | 235:685d5f11838f | 149 | |
mbed_official | 235:685d5f11838f | 150 | uint16_t RxXferSize; /* SPI Rx transfer size */ |
mbed_official | 235:685d5f11838f | 151 | |
mbed_official | 235:685d5f11838f | 152 | uint16_t RxXferCount; /* SPI Rx Transfer Counter */ |
mbed_official | 235:685d5f11838f | 153 | |
mbed_official | 235:685d5f11838f | 154 | DMA_HandleTypeDef *hdmatx; /* SPI Tx DMA handle parameters */ |
mbed_official | 235:685d5f11838f | 155 | |
mbed_official | 235:685d5f11838f | 156 | DMA_HandleTypeDef *hdmarx; /* SPI Rx DMA handle parameters */ |
mbed_official | 235:685d5f11838f | 157 | |
mbed_official | 235:685d5f11838f | 158 | void (*RxISR)(struct __SPI_HandleTypeDef * hspi); /* function pointer on Rx ISR */ |
mbed_official | 235:685d5f11838f | 159 | |
mbed_official | 235:685d5f11838f | 160 | void (*TxISR)(struct __SPI_HandleTypeDef * hspi); /* function pointer on Tx ISR */ |
mbed_official | 235:685d5f11838f | 161 | |
mbed_official | 235:685d5f11838f | 162 | HAL_LockTypeDef Lock; /* SPI locking object */ |
mbed_official | 235:685d5f11838f | 163 | |
mbed_official | 235:685d5f11838f | 164 | __IO HAL_SPI_StateTypeDef State; /* SPI communication state */ |
mbed_official | 235:685d5f11838f | 165 | |
mbed_official | 235:685d5f11838f | 166 | __IO HAL_SPI_ErrorTypeDef ErrorCode; /* SPI Error code */ |
mbed_official | 235:685d5f11838f | 167 | |
mbed_official | 235:685d5f11838f | 168 | }SPI_HandleTypeDef; |
mbed_official | 235:685d5f11838f | 169 | |
mbed_official | 235:685d5f11838f | 170 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 171 | |
mbed_official | 235:685d5f11838f | 172 | /** @defgroup SPI_Exported_Constants |
mbed_official | 235:685d5f11838f | 173 | * @{ |
mbed_official | 235:685d5f11838f | 174 | */ |
mbed_official | 235:685d5f11838f | 175 | |
mbed_official | 235:685d5f11838f | 176 | /** @defgroup SPI_mode |
mbed_official | 235:685d5f11838f | 177 | * @{ |
mbed_official | 235:685d5f11838f | 178 | */ |
mbed_official | 235:685d5f11838f | 179 | #define SPI_MODE_SLAVE ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 180 | #define SPI_MODE_MASTER (SPI_CR1_MSTR | SPI_CR1_SSI) |
mbed_official | 235:685d5f11838f | 181 | |
mbed_official | 235:685d5f11838f | 182 | #define IS_SPI_MODE(MODE) (((MODE) == SPI_MODE_SLAVE) || \ |
mbed_official | 235:685d5f11838f | 183 | ((MODE) == SPI_MODE_MASTER)) |
mbed_official | 235:685d5f11838f | 184 | /** |
mbed_official | 235:685d5f11838f | 185 | * @} |
mbed_official | 235:685d5f11838f | 186 | */ |
mbed_official | 235:685d5f11838f | 187 | |
mbed_official | 235:685d5f11838f | 188 | /** @defgroup SPI_Direction_mode |
mbed_official | 235:685d5f11838f | 189 | * @{ |
mbed_official | 235:685d5f11838f | 190 | */ |
mbed_official | 235:685d5f11838f | 191 | #define SPI_DIRECTION_2LINES ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 192 | #define SPI_DIRECTION_2LINES_RXONLY SPI_CR1_RXONLY |
mbed_official | 235:685d5f11838f | 193 | #define SPI_DIRECTION_1LINE SPI_CR1_BIDIMODE |
mbed_official | 235:685d5f11838f | 194 | |
mbed_official | 235:685d5f11838f | 195 | #define IS_SPI_DIRECTION_MODE(MODE) (((MODE) == SPI_DIRECTION_2LINES) || \ |
mbed_official | 235:685d5f11838f | 196 | ((MODE) == SPI_DIRECTION_2LINES_RXONLY) || \ |
mbed_official | 235:685d5f11838f | 197 | ((MODE) == SPI_DIRECTION_1LINE)) |
mbed_official | 235:685d5f11838f | 198 | |
mbed_official | 235:685d5f11838f | 199 | #define IS_SPI_DIRECTION_2LINES_OR_1LINE(MODE) (((MODE) == SPI_DIRECTION_2LINES) || \ |
mbed_official | 235:685d5f11838f | 200 | ((MODE) == SPI_DIRECTION_1LINE)) |
mbed_official | 235:685d5f11838f | 201 | |
mbed_official | 235:685d5f11838f | 202 | #define IS_SPI_DIRECTION_2LINES(MODE) ((MODE) == SPI_DIRECTION_2LINES) |
mbed_official | 235:685d5f11838f | 203 | |
mbed_official | 235:685d5f11838f | 204 | /** |
mbed_official | 235:685d5f11838f | 205 | * @} |
mbed_official | 235:685d5f11838f | 206 | */ |
mbed_official | 235:685d5f11838f | 207 | |
mbed_official | 235:685d5f11838f | 208 | /** @defgroup SPI_data_size |
mbed_official | 235:685d5f11838f | 209 | * @{ |
mbed_official | 235:685d5f11838f | 210 | */ |
mbed_official | 235:685d5f11838f | 211 | #define SPI_DATASIZE_8BIT ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 212 | #define SPI_DATASIZE_16BIT SPI_CR1_DFF |
mbed_official | 235:685d5f11838f | 213 | |
mbed_official | 235:685d5f11838f | 214 | #define IS_SPI_DATASIZE(DATASIZE) (((DATASIZE) == SPI_DATASIZE_16BIT) || \ |
mbed_official | 235:685d5f11838f | 215 | ((DATASIZE) == SPI_DATASIZE_8BIT)) |
mbed_official | 235:685d5f11838f | 216 | /** |
mbed_official | 235:685d5f11838f | 217 | * @} |
mbed_official | 235:685d5f11838f | 218 | */ |
mbed_official | 235:685d5f11838f | 219 | |
mbed_official | 235:685d5f11838f | 220 | /** @defgroup SPI_Clock_Polarity |
mbed_official | 235:685d5f11838f | 221 | * @{ |
mbed_official | 235:685d5f11838f | 222 | */ |
mbed_official | 235:685d5f11838f | 223 | #define SPI_POLARITY_LOW ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 224 | #define SPI_POLARITY_HIGH SPI_CR1_CPOL |
mbed_official | 235:685d5f11838f | 225 | |
mbed_official | 235:685d5f11838f | 226 | #define IS_SPI_CPOL(CPOL) (((CPOL) == SPI_POLARITY_LOW) || \ |
mbed_official | 235:685d5f11838f | 227 | ((CPOL) == SPI_POLARITY_HIGH)) |
mbed_official | 235:685d5f11838f | 228 | /** |
mbed_official | 235:685d5f11838f | 229 | * @} |
mbed_official | 235:685d5f11838f | 230 | */ |
mbed_official | 235:685d5f11838f | 231 | |
mbed_official | 235:685d5f11838f | 232 | /** @defgroup SPI_Clock_Phase |
mbed_official | 235:685d5f11838f | 233 | * @{ |
mbed_official | 235:685d5f11838f | 234 | */ |
mbed_official | 235:685d5f11838f | 235 | #define SPI_PHASE_1EDGE ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 236 | #define SPI_PHASE_2EDGE SPI_CR1_CPHA |
mbed_official | 235:685d5f11838f | 237 | |
mbed_official | 235:685d5f11838f | 238 | #define IS_SPI_CPHA(CPHA) (((CPHA) == SPI_PHASE_1EDGE) || \ |
mbed_official | 235:685d5f11838f | 239 | ((CPHA) == SPI_PHASE_2EDGE)) |
mbed_official | 235:685d5f11838f | 240 | /** |
mbed_official | 235:685d5f11838f | 241 | * @} |
mbed_official | 235:685d5f11838f | 242 | */ |
mbed_official | 235:685d5f11838f | 243 | |
mbed_official | 235:685d5f11838f | 244 | /** @defgroup SPI_Slave_Select_management |
mbed_official | 235:685d5f11838f | 245 | * @{ |
mbed_official | 235:685d5f11838f | 246 | */ |
mbed_official | 235:685d5f11838f | 247 | #define SPI_NSS_SOFT SPI_CR1_SSM |
mbed_official | 235:685d5f11838f | 248 | #define SPI_NSS_HARD_INPUT ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 249 | #define SPI_NSS_HARD_OUTPUT ((uint32_t)0x00040000) |
mbed_official | 235:685d5f11838f | 250 | |
mbed_official | 235:685d5f11838f | 251 | #define IS_SPI_NSS(NSS) (((NSS) == SPI_NSS_SOFT) || \ |
mbed_official | 235:685d5f11838f | 252 | ((NSS) == SPI_NSS_HARD_INPUT) || \ |
mbed_official | 235:685d5f11838f | 253 | ((NSS) == SPI_NSS_HARD_OUTPUT)) |
mbed_official | 235:685d5f11838f | 254 | /** |
mbed_official | 235:685d5f11838f | 255 | * @} |
mbed_official | 235:685d5f11838f | 256 | */ |
mbed_official | 235:685d5f11838f | 257 | |
mbed_official | 235:685d5f11838f | 258 | /** @defgroup SPI_BaudRate_Prescaler |
mbed_official | 235:685d5f11838f | 259 | * @{ |
mbed_official | 235:685d5f11838f | 260 | */ |
mbed_official | 235:685d5f11838f | 261 | #define SPI_BAUDRATEPRESCALER_2 ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 262 | #define SPI_BAUDRATEPRESCALER_4 ((uint32_t)0x00000008) |
mbed_official | 235:685d5f11838f | 263 | #define SPI_BAUDRATEPRESCALER_8 ((uint32_t)0x00000010) |
mbed_official | 235:685d5f11838f | 264 | #define SPI_BAUDRATEPRESCALER_16 ((uint32_t)0x00000018) |
mbed_official | 235:685d5f11838f | 265 | #define SPI_BAUDRATEPRESCALER_32 ((uint32_t)0x00000020) |
mbed_official | 235:685d5f11838f | 266 | #define SPI_BAUDRATEPRESCALER_64 ((uint32_t)0x00000028) |
mbed_official | 235:685d5f11838f | 267 | #define SPI_BAUDRATEPRESCALER_128 ((uint32_t)0x00000030) |
mbed_official | 235:685d5f11838f | 268 | #define SPI_BAUDRATEPRESCALER_256 ((uint32_t)0x00000038) |
mbed_official | 235:685d5f11838f | 269 | |
mbed_official | 235:685d5f11838f | 270 | #define IS_SPI_BAUDRATE_PRESCALER(PRESCALER) (((PRESCALER) == SPI_BAUDRATEPRESCALER_2) || \ |
mbed_official | 235:685d5f11838f | 271 | ((PRESCALER) == SPI_BAUDRATEPRESCALER_4) || \ |
mbed_official | 235:685d5f11838f | 272 | ((PRESCALER) == SPI_BAUDRATEPRESCALER_8) || \ |
mbed_official | 235:685d5f11838f | 273 | ((PRESCALER) == SPI_BAUDRATEPRESCALER_16) || \ |
mbed_official | 235:685d5f11838f | 274 | ((PRESCALER) == SPI_BAUDRATEPRESCALER_32) || \ |
mbed_official | 235:685d5f11838f | 275 | ((PRESCALER) == SPI_BAUDRATEPRESCALER_64) || \ |
mbed_official | 235:685d5f11838f | 276 | ((PRESCALER) == SPI_BAUDRATEPRESCALER_128) || \ |
mbed_official | 235:685d5f11838f | 277 | ((PRESCALER) == SPI_BAUDRATEPRESCALER_256)) |
mbed_official | 235:685d5f11838f | 278 | /** |
mbed_official | 235:685d5f11838f | 279 | * @} |
mbed_official | 235:685d5f11838f | 280 | */ |
mbed_official | 235:685d5f11838f | 281 | |
mbed_official | 235:685d5f11838f | 282 | /** @defgroup SPI_MSB_LSB_transmission |
mbed_official | 235:685d5f11838f | 283 | * @{ |
mbed_official | 235:685d5f11838f | 284 | */ |
mbed_official | 235:685d5f11838f | 285 | #define SPI_FIRSTBIT_MSB ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 286 | #define SPI_FIRSTBIT_LSB SPI_CR1_LSBFIRST |
mbed_official | 235:685d5f11838f | 287 | |
mbed_official | 235:685d5f11838f | 288 | #define IS_SPI_FIRST_BIT(BIT) (((BIT) == SPI_FIRSTBIT_MSB) || \ |
mbed_official | 235:685d5f11838f | 289 | ((BIT) == SPI_FIRSTBIT_LSB)) |
mbed_official | 235:685d5f11838f | 290 | /** |
mbed_official | 235:685d5f11838f | 291 | * @} |
mbed_official | 235:685d5f11838f | 292 | */ |
mbed_official | 235:685d5f11838f | 293 | |
mbed_official | 235:685d5f11838f | 294 | /** @defgroup SPI_TI_mode |
mbed_official | 235:685d5f11838f | 295 | * @{ |
mbed_official | 235:685d5f11838f | 296 | */ |
mbed_official | 235:685d5f11838f | 297 | #define SPI_TIMODE_DISABLED ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 298 | #define SPI_TIMODE_ENABLED SPI_CR2_FRF |
mbed_official | 235:685d5f11838f | 299 | |
mbed_official | 235:685d5f11838f | 300 | #define IS_SPI_TIMODE(MODE) (((MODE) == SPI_TIMODE_DISABLED) || \ |
mbed_official | 235:685d5f11838f | 301 | ((MODE) == SPI_TIMODE_ENABLED)) |
mbed_official | 235:685d5f11838f | 302 | /** |
mbed_official | 235:685d5f11838f | 303 | * @} |
mbed_official | 235:685d5f11838f | 304 | */ |
mbed_official | 235:685d5f11838f | 305 | |
mbed_official | 235:685d5f11838f | 306 | /** @defgroup SPI_CRC_Calculation |
mbed_official | 235:685d5f11838f | 307 | * @{ |
mbed_official | 235:685d5f11838f | 308 | */ |
mbed_official | 235:685d5f11838f | 309 | #define SPI_CRCCALCULATION_DISABLED ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 310 | #define SPI_CRCCALCULATION_ENABLED SPI_CR1_CRCEN |
mbed_official | 235:685d5f11838f | 311 | |
mbed_official | 235:685d5f11838f | 312 | #define IS_SPI_CRC_CALCULATION(CALCULATION) (((CALCULATION) == SPI_CRCCALCULATION_DISABLED) || \ |
mbed_official | 235:685d5f11838f | 313 | ((CALCULATION) == SPI_CRCCALCULATION_ENABLED)) |
mbed_official | 235:685d5f11838f | 314 | /** |
mbed_official | 235:685d5f11838f | 315 | * @} |
mbed_official | 235:685d5f11838f | 316 | */ |
mbed_official | 235:685d5f11838f | 317 | |
mbed_official | 235:685d5f11838f | 318 | /** @defgroup SPI_Interrupt_configuration_definition |
mbed_official | 235:685d5f11838f | 319 | * @{ |
mbed_official | 235:685d5f11838f | 320 | */ |
mbed_official | 235:685d5f11838f | 321 | #define SPI_IT_TXE SPI_CR2_TXEIE |
mbed_official | 235:685d5f11838f | 322 | #define SPI_IT_RXNE SPI_CR2_RXNEIE |
mbed_official | 235:685d5f11838f | 323 | #define SPI_IT_ERR SPI_CR2_ERRIE |
mbed_official | 235:685d5f11838f | 324 | /** |
mbed_official | 235:685d5f11838f | 325 | * @} |
mbed_official | 235:685d5f11838f | 326 | */ |
mbed_official | 235:685d5f11838f | 327 | |
mbed_official | 235:685d5f11838f | 328 | /** @defgroup SPI_Flag_definition |
mbed_official | 235:685d5f11838f | 329 | * @{ |
mbed_official | 235:685d5f11838f | 330 | */ |
mbed_official | 235:685d5f11838f | 331 | #define SPI_FLAG_RXNE SPI_SR_RXNE |
mbed_official | 235:685d5f11838f | 332 | #define SPI_FLAG_TXE SPI_SR_TXE |
mbed_official | 235:685d5f11838f | 333 | #define SPI_FLAG_CRCERR SPI_SR_CRCERR |
mbed_official | 235:685d5f11838f | 334 | #define SPI_FLAG_MODF SPI_SR_MODF |
mbed_official | 235:685d5f11838f | 335 | #define SPI_FLAG_OVR SPI_SR_OVR |
mbed_official | 235:685d5f11838f | 336 | #define SPI_FLAG_BSY SPI_SR_BSY |
mbed_official | 235:685d5f11838f | 337 | #define SPI_FLAG_FRE SPI_SR_FRE |
mbed_official | 235:685d5f11838f | 338 | |
mbed_official | 235:685d5f11838f | 339 | /** |
mbed_official | 235:685d5f11838f | 340 | * @} |
mbed_official | 235:685d5f11838f | 341 | */ |
mbed_official | 235:685d5f11838f | 342 | |
mbed_official | 235:685d5f11838f | 343 | /** |
mbed_official | 235:685d5f11838f | 344 | * @} |
mbed_official | 235:685d5f11838f | 345 | */ |
mbed_official | 235:685d5f11838f | 346 | |
mbed_official | 235:685d5f11838f | 347 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 348 | |
mbed_official | 235:685d5f11838f | 349 | /** @brief Reset SPI handle state |
mbed_official | 235:685d5f11838f | 350 | * @param __HANDLE__: specifies the SPI handle. |
mbed_official | 235:685d5f11838f | 351 | * This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
mbed_official | 235:685d5f11838f | 352 | * @retval None |
mbed_official | 235:685d5f11838f | 353 | */ |
mbed_official | 235:685d5f11838f | 354 | #define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SPI_STATE_RESET) |
mbed_official | 235:685d5f11838f | 355 | |
mbed_official | 235:685d5f11838f | 356 | /** @brief Enable or disable the specified SPI interrupts. |
mbed_official | 235:685d5f11838f | 357 | * @param __HANDLE__: specifies the SPI handle. |
mbed_official | 235:685d5f11838f | 358 | * This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
mbed_official | 235:685d5f11838f | 359 | * @param __INTERRUPT__: specifies the interrupt source to enable or disable. |
mbed_official | 235:685d5f11838f | 360 | * This parameter can be one of the following values: |
mbed_official | 235:685d5f11838f | 361 | * @arg SPI_IT_TXE: Tx buffer empty interrupt enable |
mbed_official | 235:685d5f11838f | 362 | * @arg SPI_IT_RXNE: RX buffer not empty interrupt enable |
mbed_official | 235:685d5f11838f | 363 | * @arg SPI_IT_ERR: Error interrupt enable |
mbed_official | 235:685d5f11838f | 364 | * @retval None |
mbed_official | 235:685d5f11838f | 365 | */ |
mbed_official | 235:685d5f11838f | 366 | #define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 |= (__INTERRUPT__)) |
mbed_official | 235:685d5f11838f | 367 | #define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 &= (~(__INTERRUPT__))) |
mbed_official | 235:685d5f11838f | 368 | |
mbed_official | 235:685d5f11838f | 369 | /** @brief Check if the specified SPI interrupt source is enabled or disabled. |
mbed_official | 235:685d5f11838f | 370 | * @param __HANDLE__: specifies the SPI handle. |
mbed_official | 235:685d5f11838f | 371 | * This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
mbed_official | 235:685d5f11838f | 372 | * @param __INTERRUPT__: specifies the SPI interrupt source to check. |
mbed_official | 235:685d5f11838f | 373 | * This parameter can be one of the following values: |
mbed_official | 235:685d5f11838f | 374 | * @arg SPI_IT_TXE: Tx buffer empty interrupt enable |
mbed_official | 235:685d5f11838f | 375 | * @arg SPI_IT_RXNE: RX buffer not empty interrupt enable |
mbed_official | 235:685d5f11838f | 376 | * @arg SPI_IT_ERR: Error interrupt enable |
mbed_official | 235:685d5f11838f | 377 | * @retval The new state of __IT__ (TRUE or FALSE). |
mbed_official | 235:685d5f11838f | 378 | */ |
mbed_official | 235:685d5f11838f | 379 | #define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
mbed_official | 235:685d5f11838f | 380 | |
mbed_official | 235:685d5f11838f | 381 | /** @brief Check whether the specified SPI flag is set or not. |
mbed_official | 235:685d5f11838f | 382 | * @param __HANDLE__: specifies the SPI handle. |
mbed_official | 235:685d5f11838f | 383 | * This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
mbed_official | 235:685d5f11838f | 384 | * @param __FLAG__: specifies the flag to check. |
mbed_official | 235:685d5f11838f | 385 | * This parameter can be one of the following values: |
mbed_official | 235:685d5f11838f | 386 | * @arg SPI_FLAG_RXNE: Receive buffer not empty flag |
mbed_official | 235:685d5f11838f | 387 | * @arg SPI_FLAG_TXE: Transmit buffer empty flag |
mbed_official | 235:685d5f11838f | 388 | * @arg SPI_FLAG_CRCERR: CRC error flag |
mbed_official | 235:685d5f11838f | 389 | * @arg SPI_FLAG_MODF: Mode fault flag |
mbed_official | 235:685d5f11838f | 390 | * @arg SPI_FLAG_OVR: Overrun flag |
mbed_official | 235:685d5f11838f | 391 | * @arg SPI_FLAG_BSY: Busy flag |
mbed_official | 235:685d5f11838f | 392 | * @arg SPI_FLAG_FRE: Frame format error flag |
mbed_official | 235:685d5f11838f | 393 | * @retval The new state of __FLAG__ (TRUE or FALSE). |
mbed_official | 235:685d5f11838f | 394 | */ |
mbed_official | 235:685d5f11838f | 395 | #define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__)) |
mbed_official | 235:685d5f11838f | 396 | |
mbed_official | 235:685d5f11838f | 397 | /** @brief Clear the SPI CRCERR pending flag. |
mbed_official | 235:685d5f11838f | 398 | * @param __HANDLE__: specifies the SPI handle. |
mbed_official | 235:685d5f11838f | 399 | * This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
mbed_official | 235:685d5f11838f | 400 | * @retval None |
mbed_official | 235:685d5f11838f | 401 | */ |
mbed_official | 235:685d5f11838f | 402 | #define __HAL_SPI_CLEAR_CRCERRFLAG(__HANDLE__) ((__HANDLE__)->Instance->SR = ~(SPI_FLAG_CRCERR)) |
mbed_official | 235:685d5f11838f | 403 | |
mbed_official | 235:685d5f11838f | 404 | /** @brief Clear the SPI MODF pending flag. |
mbed_official | 235:685d5f11838f | 405 | * @param __HANDLE__: specifies the SPI handle. |
mbed_official | 235:685d5f11838f | 406 | * This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
mbed_official | 235:685d5f11838f | 407 | * @retval None |
mbed_official | 235:685d5f11838f | 408 | */ |
mbed_official | 235:685d5f11838f | 409 | #define __HAL_SPI_CLEAR_MODFFLAG(__HANDLE__) do{(__HANDLE__)->Instance->SR;\ |
mbed_official | 235:685d5f11838f | 410 | (__HANDLE__)->Instance->CR1 &= (~SPI_CR1_SPE);}while(0) |
mbed_official | 235:685d5f11838f | 411 | |
mbed_official | 235:685d5f11838f | 412 | /** @brief Clear the SPI OVR pending flag. |
mbed_official | 235:685d5f11838f | 413 | * @param __HANDLE__: specifies the SPI handle. |
mbed_official | 235:685d5f11838f | 414 | * This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
mbed_official | 235:685d5f11838f | 415 | * @retval None |
mbed_official | 235:685d5f11838f | 416 | */ |
mbed_official | 235:685d5f11838f | 417 | #define __HAL_SPI_CLEAR_OVRFLAG(__HANDLE__) do{(__HANDLE__)->Instance->DR;\ |
mbed_official | 235:685d5f11838f | 418 | (__HANDLE__)->Instance->SR;}while(0) |
mbed_official | 235:685d5f11838f | 419 | |
mbed_official | 235:685d5f11838f | 420 | /** @brief Clear the SPI FRE pending flag. |
mbed_official | 235:685d5f11838f | 421 | * @param __HANDLE__: specifies the SPI handle. |
mbed_official | 235:685d5f11838f | 422 | * This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral. |
mbed_official | 235:685d5f11838f | 423 | * @retval None |
mbed_official | 235:685d5f11838f | 424 | */ |
mbed_official | 235:685d5f11838f | 425 | #define __HAL_SPI_CLEAR_FREFLAG(__HANDLE__) ((__HANDLE__)->Instance->SR) |
mbed_official | 235:685d5f11838f | 426 | |
mbed_official | 235:685d5f11838f | 427 | #define __HAL_SPI_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= SPI_CR1_SPE) |
mbed_official | 235:685d5f11838f | 428 | #define __HAL_SPI_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~SPI_CR1_SPE) |
mbed_official | 235:685d5f11838f | 429 | |
mbed_official | 235:685d5f11838f | 430 | #define IS_SPI_CRC_POLYNOMIAL(POLYNOMIAL) (((POLYNOMIAL) >= 0x1) && ((POLYNOMIAL) <= 0xFFFF)) |
mbed_official | 235:685d5f11838f | 431 | |
mbed_official | 235:685d5f11838f | 432 | #define __HAL_SPI_1LINE_TX(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= SPI_CR1_BIDIOE) |
mbed_official | 235:685d5f11838f | 433 | |
mbed_official | 235:685d5f11838f | 434 | #define __HAL_SPI_1LINE_RX(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~SPI_CR1_BIDIOE) |
mbed_official | 235:685d5f11838f | 435 | |
mbed_official | 235:685d5f11838f | 436 | #define __HAL_SPI_RESET_CRC(__HANDLE__) do{(__HANDLE__)->Instance->CR1 &= (~SPI_CR1_CRCEN);\ |
mbed_official | 235:685d5f11838f | 437 | (__HANDLE__)->Instance->CR1 |= SPI_CR1_CRCEN;}while(0) |
mbed_official | 235:685d5f11838f | 438 | |
mbed_official | 235:685d5f11838f | 439 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 440 | |
mbed_official | 235:685d5f11838f | 441 | /* Initialization/de-initialization functions **********************************/ |
mbed_official | 235:685d5f11838f | 442 | HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 443 | HAL_StatusTypeDef HAL_SPI_DeInit (SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 444 | void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 445 | void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 446 | |
mbed_official | 235:685d5f11838f | 447 | /* I/O operation functions *****************************************************/ |
mbed_official | 235:685d5f11838f | 448 | HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout); |
mbed_official | 235:685d5f11838f | 449 | HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout); |
mbed_official | 235:685d5f11838f | 450 | HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size, uint32_t Timeout); |
mbed_official | 235:685d5f11838f | 451 | HAL_StatusTypeDef HAL_SPI_Transmit_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size); |
mbed_official | 235:685d5f11838f | 452 | HAL_StatusTypeDef HAL_SPI_Receive_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size); |
mbed_official | 235:685d5f11838f | 453 | HAL_StatusTypeDef HAL_SPI_TransmitReceive_IT(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size); |
mbed_official | 235:685d5f11838f | 454 | HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size); |
mbed_official | 235:685d5f11838f | 455 | HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size); |
mbed_official | 235:685d5f11838f | 456 | HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size); |
mbed_official | 235:685d5f11838f | 457 | HAL_StatusTypeDef HAL_SPI_DMAPause(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 458 | HAL_StatusTypeDef HAL_SPI_DMAResume(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 459 | HAL_StatusTypeDef HAL_SPI_DMAStop(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 460 | |
mbed_official | 235:685d5f11838f | 461 | void HAL_SPI_IRQHandler(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 462 | void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 463 | void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 464 | void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 465 | void HAL_SPI_ErrorCallback(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 466 | void HAL_SPI_TxHalfCpltCallback(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 467 | void HAL_SPI_RxHalfCpltCallback(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 468 | void HAL_SPI_TxRxHalfCpltCallback(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 469 | |
mbed_official | 235:685d5f11838f | 470 | /* Peripheral State and Control functions **************************************/ |
mbed_official | 235:685d5f11838f | 471 | HAL_SPI_StateTypeDef HAL_SPI_GetState(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 472 | HAL_SPI_ErrorTypeDef HAL_SPI_GetError(SPI_HandleTypeDef *hspi); |
mbed_official | 235:685d5f11838f | 473 | |
mbed_official | 235:685d5f11838f | 474 | /** |
mbed_official | 235:685d5f11838f | 475 | * @} |
mbed_official | 235:685d5f11838f | 476 | */ |
mbed_official | 235:685d5f11838f | 477 | |
mbed_official | 235:685d5f11838f | 478 | /** |
mbed_official | 235:685d5f11838f | 479 | * @} |
mbed_official | 235:685d5f11838f | 480 | */ |
mbed_official | 235:685d5f11838f | 481 | |
mbed_official | 235:685d5f11838f | 482 | #ifdef __cplusplus |
mbed_official | 235:685d5f11838f | 483 | } |
mbed_official | 235:685d5f11838f | 484 | #endif |
mbed_official | 235:685d5f11838f | 485 | |
mbed_official | 235:685d5f11838f | 486 | #endif /* __STM32F4xx_HAL_SPI_H */ |
mbed_official | 235:685d5f11838f | 487 | |
mbed_official | 235:685d5f11838f | 488 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |