The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
<>
Date:
Wed Apr 12 16:07:08 2017 +0100
Revision:
140:97feb9bacc10
Parent:
128:9bcdf88f62b0
Child:
145:64910690c574
Release 140 of the mbed library

Ports for Upcoming Targets

3841: Add nRf52840 target https://github.com/ARMmbed/mbed-os/pull/3841
3992: Introducing UBLOX_C030 platform. https://github.com/ARMmbed/mbed-os/pull/3992

Fixes and Changes

3951: [NUCLEO_F303ZE] Correct ARDUINO pin https://github.com/ARMmbed/mbed-os/pull/3951
4021: Fixing a macro to detect when RTOS was in use for the NRF52840_DK https://github.com/ARMmbed/mbed-os/pull/4021
3979: KW24D: Add missing SPI defines and Arduino connector definitions https://github.com/ARMmbed/mbed-os/pull/3979
3990: UBLOX_C027: construct a ticker-based wait, rather than calling wait_ms(), in the https://github.com/ARMmbed/mbed-os/pull/3990
4003: Fixed OBOE in async serial tx for NRF52 target, fixes #4002 https://github.com/ARMmbed/mbed-os/pull/4003
4012: STM32: Correct I2C master error handling https://github.com/ARMmbed/mbed-os/pull/4012
4020: NUCLEO_L011K4 remove unsupported tool chain files https://github.com/ARMmbed/mbed-os/pull/4020
4065: K66F: Move bss section to m_data_2 Section https://github.com/ARMmbed/mbed-os/pull/4065
4014: Issue 3763: Reduce heap allocation in the GCC linker file https://github.com/ARMmbed/mbed-os/pull/4014
4030: [STM32L0] reduce IAR heap and stack size for small targets https://github.com/ARMmbed/mbed-os/pull/4030
4109: NUCLEO_L476RG : minor serial pin update https://github.com/ARMmbed/mbed-os/pull/4109
3982: Ticker - kl25z bugfix for handling events in the past https://github.com/ARMmbed/mbed-os/pull/3982

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 122:f9eeca106725 1 /**
Kojto 122:f9eeca106725 2 ******************************************************************************
Kojto 122:f9eeca106725 3 * @file stm32l4xx_ll_sdmmc.h
Kojto 122:f9eeca106725 4 * @author MCD Application Team
Kojto 122:f9eeca106725 5 * @version V1.5.1
Kojto 122:f9eeca106725 6 * @date $DATE$
Kojto 122:f9eeca106725 7 * @brief Header file of low layer SDMMC HAL module.
Kojto 122:f9eeca106725 8 ******************************************************************************
Kojto 122:f9eeca106725 9 * @attention
Kojto 122:f9eeca106725 10 *
Kojto 122:f9eeca106725 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
Kojto 122:f9eeca106725 12 *
Kojto 122:f9eeca106725 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 122:f9eeca106725 14 * are permitted provided that the following conditions are met:
Kojto 122:f9eeca106725 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 122:f9eeca106725 16 * this list of conditions and the following disclaimer.
Kojto 122:f9eeca106725 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 122:f9eeca106725 18 * this list of conditions and the following disclaimer in the documentation
Kojto 122:f9eeca106725 19 * and/or other materials provided with the distribution.
Kojto 122:f9eeca106725 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 122:f9eeca106725 21 * may be used to endorse or promote products derived from this software
Kojto 122:f9eeca106725 22 * without specific prior written permission.
Kojto 122:f9eeca106725 23 *
Kojto 122:f9eeca106725 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 122:f9eeca106725 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 122:f9eeca106725 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 122:f9eeca106725 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 122:f9eeca106725 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 122:f9eeca106725 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 122:f9eeca106725 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 122:f9eeca106725 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 122:f9eeca106725 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 122:f9eeca106725 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 122:f9eeca106725 34 *
Kojto 122:f9eeca106725 35 ******************************************************************************
Kojto 122:f9eeca106725 36 */
Kojto 122:f9eeca106725 37
Kojto 122:f9eeca106725 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 122:f9eeca106725 39 #ifndef __STM32L4xx_LL_SDMMC_H
Kojto 122:f9eeca106725 40 #define __STM32L4xx_LL_SDMMC_H
Kojto 122:f9eeca106725 41
Kojto 122:f9eeca106725 42 #ifdef __cplusplus
Kojto 122:f9eeca106725 43 extern "C" {
Kojto 122:f9eeca106725 44 #endif
Kojto 122:f9eeca106725 45
Kojto 122:f9eeca106725 46 #if defined(SDMMC1)
Kojto 122:f9eeca106725 47
Kojto 122:f9eeca106725 48 /* Includes ------------------------------------------------------------------*/
Kojto 122:f9eeca106725 49 #include "stm32l4xx_hal_def.h"
Kojto 122:f9eeca106725 50
Kojto 122:f9eeca106725 51 /** @addtogroup STM32L4xx_Driver
Kojto 122:f9eeca106725 52 * @{
Kojto 122:f9eeca106725 53 */
Kojto 122:f9eeca106725 54
Kojto 122:f9eeca106725 55 /** @addtogroup SDMMC_LL
Kojto 122:f9eeca106725 56 * @{
Kojto 122:f9eeca106725 57 */
Kojto 122:f9eeca106725 58
Kojto 122:f9eeca106725 59 /* Exported types ------------------------------------------------------------*/
Kojto 122:f9eeca106725 60 /** @defgroup SDMMC_LL_Exported_Types SDMMC_LL Exported Types
Kojto 122:f9eeca106725 61 * @{
Kojto 122:f9eeca106725 62 */
Kojto 122:f9eeca106725 63
Kojto 122:f9eeca106725 64 /**
Kojto 122:f9eeca106725 65 * @brief SDMMC Configuration Structure definition
Kojto 122:f9eeca106725 66 */
Kojto 122:f9eeca106725 67 typedef struct
Kojto 122:f9eeca106725 68 {
Kojto 122:f9eeca106725 69 uint32_t ClockEdge; /*!< Specifies the clock transition on which the bit capture is made.
Kojto 122:f9eeca106725 70 This parameter can be a value of @ref SDMMC_LL_Clock_Edge */
Kojto 122:f9eeca106725 71
Kojto 122:f9eeca106725 72 uint32_t ClockBypass; /*!< Specifies whether the SDMMC Clock divider bypass is
Kojto 122:f9eeca106725 73 enabled or disabled.
Kojto 122:f9eeca106725 74 This parameter can be a value of @ref SDMMC_LL_Clock_Bypass */
Kojto 122:f9eeca106725 75
Kojto 122:f9eeca106725 76 uint32_t ClockPowerSave; /*!< Specifies whether SDMMC Clock output is enabled or
Kojto 122:f9eeca106725 77 disabled when the bus is idle.
Kojto 122:f9eeca106725 78 This parameter can be a value of @ref SDMMC_LL_Clock_Power_Save */
Kojto 122:f9eeca106725 79
Kojto 122:f9eeca106725 80 uint32_t BusWide; /*!< Specifies the SDMMC bus width.
Kojto 122:f9eeca106725 81 This parameter can be a value of @ref SDMMC_LL_Bus_Wide */
Kojto 122:f9eeca106725 82
Kojto 122:f9eeca106725 83 uint32_t HardwareFlowControl; /*!< Specifies whether the SDMMC hardware flow control is enabled or disabled.
Kojto 122:f9eeca106725 84 This parameter can be a value of @ref SDMMC_LL_Hardware_Flow_Control */
Kojto 122:f9eeca106725 85
Kojto 122:f9eeca106725 86 uint32_t ClockDiv; /*!< Specifies the clock frequency of the SDMMC controller.
Kojto 122:f9eeca106725 87 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
Kojto 122:f9eeca106725 88
Kojto 122:f9eeca106725 89 }SDMMC_InitTypeDef;
Kojto 122:f9eeca106725 90
Kojto 122:f9eeca106725 91
Kojto 122:f9eeca106725 92 /**
Kojto 122:f9eeca106725 93 * @brief SDMMC Command Control structure
Kojto 122:f9eeca106725 94 */
Kojto 122:f9eeca106725 95 typedef struct
Kojto 122:f9eeca106725 96 {
Kojto 122:f9eeca106725 97 uint32_t Argument; /*!< Specifies the SDMMC command argument which is sent
Kojto 122:f9eeca106725 98 to a card as part of a command message. If a command
Kojto 122:f9eeca106725 99 contains an argument, it must be loaded into this register
Kojto 122:f9eeca106725 100 before writing the command to the command register. */
Kojto 122:f9eeca106725 101
Kojto 122:f9eeca106725 102 uint32_t CmdIndex; /*!< Specifies the SDMMC command index. It must be Min_Data = 0 and
Kojto 122:f9eeca106725 103 Max_Data = 64 */
Kojto 122:f9eeca106725 104
Kojto 122:f9eeca106725 105 uint32_t Response; /*!< Specifies the SDMMC response type.
Kojto 122:f9eeca106725 106 This parameter can be a value of @ref SDMMC_LL_Response_Type */
Kojto 122:f9eeca106725 107
Kojto 122:f9eeca106725 108 uint32_t WaitForInterrupt; /*!< Specifies whether SDMMC wait for interrupt request is
Kojto 122:f9eeca106725 109 enabled or disabled.
Kojto 122:f9eeca106725 110 This parameter can be a value of @ref SDMMC_LL_Wait_Interrupt_State */
Kojto 122:f9eeca106725 111
Kojto 122:f9eeca106725 112 uint32_t CPSM; /*!< Specifies whether SDMMC Command path state machine (CPSM)
Kojto 122:f9eeca106725 113 is enabled or disabled.
Kojto 122:f9eeca106725 114 This parameter can be a value of @ref SDMMC_LL_CPSM_State */
Kojto 122:f9eeca106725 115 }SDMMC_CmdInitTypeDef;
Kojto 122:f9eeca106725 116
Kojto 122:f9eeca106725 117
Kojto 122:f9eeca106725 118 /**
Kojto 122:f9eeca106725 119 * @brief SDMMC Data Control structure
Kojto 122:f9eeca106725 120 */
Kojto 122:f9eeca106725 121 typedef struct
Kojto 122:f9eeca106725 122 {
Kojto 122:f9eeca106725 123 uint32_t DataTimeOut; /*!< Specifies the data timeout period in card bus clock periods. */
Kojto 122:f9eeca106725 124
Kojto 122:f9eeca106725 125 uint32_t DataLength; /*!< Specifies the number of data bytes to be transferred. */
Kojto 122:f9eeca106725 126
Kojto 122:f9eeca106725 127 uint32_t DataBlockSize; /*!< Specifies the data block size for block transfer.
Kojto 122:f9eeca106725 128 This parameter can be a value of @ref SDMMC_LL_Data_Block_Size */
Kojto 122:f9eeca106725 129
Kojto 122:f9eeca106725 130 uint32_t TransferDir; /*!< Specifies the data transfer direction, whether the transfer
Kojto 122:f9eeca106725 131 is a read or write.
Kojto 122:f9eeca106725 132 This parameter can be a value of @ref SDMMC_LL_Transfer_Direction */
Kojto 122:f9eeca106725 133
Kojto 122:f9eeca106725 134 uint32_t TransferMode; /*!< Specifies whether data transfer is in stream or block mode.
Kojto 122:f9eeca106725 135 This parameter can be a value of @ref SDMMC_LL_Transfer_Type */
Kojto 122:f9eeca106725 136
Kojto 122:f9eeca106725 137 uint32_t DPSM; /*!< Specifies whether SDMMC Data path state machine (DPSM)
Kojto 122:f9eeca106725 138 is enabled or disabled.
Kojto 122:f9eeca106725 139 This parameter can be a value of @ref SDMMC_LL_DPSM_State */
Kojto 122:f9eeca106725 140 }SDMMC_DataInitTypeDef;
Kojto 122:f9eeca106725 141
Kojto 122:f9eeca106725 142 /**
Kojto 122:f9eeca106725 143 * @}
Kojto 122:f9eeca106725 144 */
Kojto 122:f9eeca106725 145
Kojto 122:f9eeca106725 146 /* Exported constants --------------------------------------------------------*/
Kojto 122:f9eeca106725 147 /** @defgroup SDMMC_LL_Exported_Constants SDMMC_LL Exported Constants
Kojto 122:f9eeca106725 148 * @{
Kojto 122:f9eeca106725 149 */
Kojto 122:f9eeca106725 150
Kojto 122:f9eeca106725 151 /** @defgroup SDMMC_LL_Clock_Edge Clock Edge
Kojto 122:f9eeca106725 152 * @{
Kojto 122:f9eeca106725 153 */
Kojto 122:f9eeca106725 154 #define SDMMC_CLOCK_EDGE_RISING ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 155 #define SDMMC_CLOCK_EDGE_FALLING SDMMC_CLKCR_NEGEDGE
Kojto 122:f9eeca106725 156
Kojto 122:f9eeca106725 157 #define IS_SDMMC_CLOCK_EDGE(EDGE) (((EDGE) == SDMMC_CLOCK_EDGE_RISING) || \
Kojto 122:f9eeca106725 158 ((EDGE) == SDMMC_CLOCK_EDGE_FALLING))
Kojto 122:f9eeca106725 159 /**
Kojto 122:f9eeca106725 160 * @}
Kojto 122:f9eeca106725 161 */
Kojto 122:f9eeca106725 162
Kojto 122:f9eeca106725 163 /** @defgroup SDMMC_LL_Clock_Bypass Clock Bypass
Kojto 122:f9eeca106725 164 * @{
Kojto 122:f9eeca106725 165 */
Kojto 122:f9eeca106725 166 #define SDMMC_CLOCK_BYPASS_DISABLE ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 167 #define SDMMC_CLOCK_BYPASS_ENABLE SDMMC_CLKCR_BYPASS
Kojto 122:f9eeca106725 168
Kojto 122:f9eeca106725 169 #define IS_SDMMC_CLOCK_BYPASS(BYPASS) (((BYPASS) == SDMMC_CLOCK_BYPASS_DISABLE) || \
Kojto 122:f9eeca106725 170 ((BYPASS) == SDMMC_CLOCK_BYPASS_ENABLE))
Kojto 122:f9eeca106725 171 /**
Kojto 122:f9eeca106725 172 * @}
Kojto 122:f9eeca106725 173 */
Kojto 122:f9eeca106725 174
Kojto 122:f9eeca106725 175 /** @defgroup SDMMC_LL_Clock_Power_Save Clock Power Saving
Kojto 122:f9eeca106725 176 * @{
Kojto 122:f9eeca106725 177 */
Kojto 122:f9eeca106725 178 #define SDMMC_CLOCK_POWER_SAVE_DISABLE ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 179 #define SDMMC_CLOCK_POWER_SAVE_ENABLE SDMMC_CLKCR_PWRSAV
Kojto 122:f9eeca106725 180
Kojto 122:f9eeca106725 181 #define IS_SDMMC_CLOCK_POWER_SAVE(SAVE) (((SAVE) == SDMMC_CLOCK_POWER_SAVE_DISABLE) || \
Kojto 122:f9eeca106725 182 ((SAVE) == SDMMC_CLOCK_POWER_SAVE_ENABLE))
Kojto 122:f9eeca106725 183 /**
Kojto 122:f9eeca106725 184 * @}
Kojto 122:f9eeca106725 185 */
Kojto 122:f9eeca106725 186
Kojto 122:f9eeca106725 187 /** @defgroup SDMMC_LL_Bus_Wide Bus Width
Kojto 122:f9eeca106725 188 * @{
Kojto 122:f9eeca106725 189 */
Kojto 122:f9eeca106725 190 #define SDMMC_BUS_WIDE_1B ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 191 #define SDMMC_BUS_WIDE_4B SDMMC_CLKCR_WIDBUS_0
Kojto 122:f9eeca106725 192 #define SDMMC_BUS_WIDE_8B SDMMC_CLKCR_WIDBUS_1
Kojto 122:f9eeca106725 193
Kojto 122:f9eeca106725 194 #define IS_SDMMC_BUS_WIDE(WIDE) (((WIDE) == SDMMC_BUS_WIDE_1B) || \
Kojto 122:f9eeca106725 195 ((WIDE) == SDMMC_BUS_WIDE_4B) || \
Kojto 122:f9eeca106725 196 ((WIDE) == SDMMC_BUS_WIDE_8B))
Kojto 122:f9eeca106725 197 /**
Kojto 122:f9eeca106725 198 * @}
Kojto 122:f9eeca106725 199 */
Kojto 122:f9eeca106725 200
Kojto 122:f9eeca106725 201 /** @defgroup SDMMC_LL_Hardware_Flow_Control Hardware Flow Control
Kojto 122:f9eeca106725 202 * @{
Kojto 122:f9eeca106725 203 */
Kojto 122:f9eeca106725 204 #define SDMMC_HARDWARE_FLOW_CONTROL_DISABLE ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 205 #define SDMMC_HARDWARE_FLOW_CONTROL_ENABLE SDMMC_CLKCR_HWFC_EN
Kojto 122:f9eeca106725 206
Kojto 122:f9eeca106725 207 #define IS_SDMMC_HARDWARE_FLOW_CONTROL(CONTROL) (((CONTROL) == SDMMC_HARDWARE_FLOW_CONTROL_DISABLE) || \
Kojto 122:f9eeca106725 208 ((CONTROL) == SDMMC_HARDWARE_FLOW_CONTROL_ENABLE))
Kojto 122:f9eeca106725 209 /**
Kojto 122:f9eeca106725 210 * @}
Kojto 122:f9eeca106725 211 */
Kojto 122:f9eeca106725 212
Kojto 122:f9eeca106725 213 /** @defgroup SDMMC_LL_Clock_Division Clock Division
Kojto 122:f9eeca106725 214 * @{
Kojto 122:f9eeca106725 215 */
Kojto 122:f9eeca106725 216 #define IS_SDMMC_CLKDIV(DIV) ((DIV) <= 0xFF)
Kojto 122:f9eeca106725 217 /**
Kojto 122:f9eeca106725 218 * @}
Kojto 122:f9eeca106725 219 */
Kojto 122:f9eeca106725 220
Kojto 122:f9eeca106725 221 /** @defgroup SDMMC_LL_Command_Index Command Index
Kojto 122:f9eeca106725 222 * @{
Kojto 122:f9eeca106725 223 */
Kojto 122:f9eeca106725 224 #define IS_SDMMC_CMD_INDEX(INDEX) ((INDEX) < 0x40)
Kojto 122:f9eeca106725 225 /**
Kojto 122:f9eeca106725 226 * @}
Kojto 122:f9eeca106725 227 */
Kojto 122:f9eeca106725 228
Kojto 122:f9eeca106725 229 /** @defgroup SDMMC_LL_Response_Type Response Type
Kojto 122:f9eeca106725 230 * @{
Kojto 122:f9eeca106725 231 */
Kojto 122:f9eeca106725 232 #define SDMMC_RESPONSE_NO ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 233 #define SDMMC_RESPONSE_SHORT SDMMC_CMD_WAITRESP_0
Kojto 122:f9eeca106725 234 #define SDMMC_RESPONSE_LONG SDMMC_CMD_WAITRESP
Kojto 122:f9eeca106725 235
Kojto 122:f9eeca106725 236 #define IS_SDMMC_RESPONSE(RESPONSE) (((RESPONSE) == SDMMC_RESPONSE_NO) || \
Kojto 122:f9eeca106725 237 ((RESPONSE) == SDMMC_RESPONSE_SHORT) || \
Kojto 122:f9eeca106725 238 ((RESPONSE) == SDMMC_RESPONSE_LONG))
Kojto 122:f9eeca106725 239 /**
Kojto 122:f9eeca106725 240 * @}
Kojto 122:f9eeca106725 241 */
Kojto 122:f9eeca106725 242
Kojto 122:f9eeca106725 243 /** @defgroup SDMMC_LL_Wait_Interrupt_State Wait Interrupt
Kojto 122:f9eeca106725 244 * @{
Kojto 122:f9eeca106725 245 */
Kojto 122:f9eeca106725 246 #define SDMMC_WAIT_NO ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 247 #define SDMMC_WAIT_IT SDMMC_CMD_WAITINT
Kojto 122:f9eeca106725 248 #define SDMMC_WAIT_PEND SDMMC_CMD_WAITPEND
Kojto 122:f9eeca106725 249
Kojto 122:f9eeca106725 250 #define IS_SDMMC_WAIT(WAIT) (((WAIT) == SDMMC_WAIT_NO) || \
Kojto 122:f9eeca106725 251 ((WAIT) == SDMMC_WAIT_IT) || \
Kojto 122:f9eeca106725 252 ((WAIT) == SDMMC_WAIT_PEND))
Kojto 122:f9eeca106725 253 /**
Kojto 122:f9eeca106725 254 * @}
Kojto 122:f9eeca106725 255 */
Kojto 122:f9eeca106725 256
Kojto 122:f9eeca106725 257 /** @defgroup SDMMC_LL_CPSM_State CPSM State
Kojto 122:f9eeca106725 258 * @{
Kojto 122:f9eeca106725 259 */
Kojto 122:f9eeca106725 260 #define SDMMC_CPSM_DISABLE ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 261 #define SDMMC_CPSM_ENABLE SDMMC_CMD_CPSMEN
Kojto 122:f9eeca106725 262
Kojto 122:f9eeca106725 263 #define IS_SDMMC_CPSM(CPSM) (((CPSM) == SDMMC_CPSM_DISABLE) || \
Kojto 122:f9eeca106725 264 ((CPSM) == SDMMC_CPSM_ENABLE))
Kojto 122:f9eeca106725 265 /**
Kojto 122:f9eeca106725 266 * @}
Kojto 122:f9eeca106725 267 */
Kojto 122:f9eeca106725 268
Kojto 122:f9eeca106725 269 /** @defgroup SDMMC_LL_Response_Registers Response Register
Kojto 122:f9eeca106725 270 * @{
Kojto 122:f9eeca106725 271 */
Kojto 122:f9eeca106725 272 #define SDMMC_RESP1 ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 273 #define SDMMC_RESP2 ((uint32_t)0x00000004)
Kojto 122:f9eeca106725 274 #define SDMMC_RESP3 ((uint32_t)0x00000008)
Kojto 122:f9eeca106725 275 #define SDMMC_RESP4 ((uint32_t)0x0000000C)
Kojto 122:f9eeca106725 276
Kojto 122:f9eeca106725 277 #define IS_SDMMC_RESP(RESP) (((RESP) == SDMMC_RESP1) || \
Kojto 122:f9eeca106725 278 ((RESP) == SDMMC_RESP2) || \
Kojto 122:f9eeca106725 279 ((RESP) == SDMMC_RESP3) || \
Kojto 122:f9eeca106725 280 ((RESP) == SDMMC_RESP4))
Kojto 122:f9eeca106725 281 /**
Kojto 122:f9eeca106725 282 * @}
Kojto 122:f9eeca106725 283 */
Kojto 122:f9eeca106725 284
Kojto 122:f9eeca106725 285 /** @defgroup SDMMC_LL_Data_Length Data Lenght
Kojto 122:f9eeca106725 286 * @{
Kojto 122:f9eeca106725 287 */
Kojto 122:f9eeca106725 288 #define IS_SDMMC_DATA_LENGTH(LENGTH) ((LENGTH) <= 0x01FFFFFF)
Kojto 122:f9eeca106725 289 /**
Kojto 122:f9eeca106725 290 * @}
Kojto 122:f9eeca106725 291 */
Kojto 122:f9eeca106725 292
Kojto 122:f9eeca106725 293 /** @defgroup SDMMC_LL_Data_Block_Size Data Block Size
Kojto 122:f9eeca106725 294 * @{
Kojto 122:f9eeca106725 295 */
Kojto 122:f9eeca106725 296 #define SDMMC_DATABLOCK_SIZE_1B ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 297 #define SDMMC_DATABLOCK_SIZE_2B SDMMC_DCTRL_DBLOCKSIZE_0
Kojto 122:f9eeca106725 298 #define SDMMC_DATABLOCK_SIZE_4B SDMMC_DCTRL_DBLOCKSIZE_1
Kojto 122:f9eeca106725 299 #define SDMMC_DATABLOCK_SIZE_8B (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_1)
Kojto 122:f9eeca106725 300 #define SDMMC_DATABLOCK_SIZE_16B SDMMC_DCTRL_DBLOCKSIZE_2
Kojto 122:f9eeca106725 301 #define SDMMC_DATABLOCK_SIZE_32B (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_2)
Kojto 122:f9eeca106725 302 #define SDMMC_DATABLOCK_SIZE_64B (SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_2)
Kojto 122:f9eeca106725 303 #define SDMMC_DATABLOCK_SIZE_128B (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_2)
Kojto 122:f9eeca106725 304 #define SDMMC_DATABLOCK_SIZE_256B SDMMC_DCTRL_DBLOCKSIZE_3
Kojto 122:f9eeca106725 305 #define SDMMC_DATABLOCK_SIZE_512B (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_3)
Kojto 122:f9eeca106725 306 #define SDMMC_DATABLOCK_SIZE_1024B (SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_3)
Kojto 122:f9eeca106725 307 #define SDMMC_DATABLOCK_SIZE_2048B (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_3)
Kojto 122:f9eeca106725 308 #define SDMMC_DATABLOCK_SIZE_4096B (SDMMC_DCTRL_DBLOCKSIZE_2|SDMMC_DCTRL_DBLOCKSIZE_3)
Kojto 122:f9eeca106725 309 #define SDMMC_DATABLOCK_SIZE_8192B (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_2|SDMMC_DCTRL_DBLOCKSIZE_3)
Kojto 122:f9eeca106725 310 #define SDMMC_DATABLOCK_SIZE_16384B (SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_2|SDMMC_DCTRL_DBLOCKSIZE_3)
Kojto 122:f9eeca106725 311
Kojto 122:f9eeca106725 312 #define IS_SDMMC_BLOCK_SIZE(SIZE) (((SIZE) == SDMMC_DATABLOCK_SIZE_1B) || \
Kojto 122:f9eeca106725 313 ((SIZE) == SDMMC_DATABLOCK_SIZE_2B) || \
Kojto 122:f9eeca106725 314 ((SIZE) == SDMMC_DATABLOCK_SIZE_4B) || \
Kojto 122:f9eeca106725 315 ((SIZE) == SDMMC_DATABLOCK_SIZE_8B) || \
Kojto 122:f9eeca106725 316 ((SIZE) == SDMMC_DATABLOCK_SIZE_16B) || \
Kojto 122:f9eeca106725 317 ((SIZE) == SDMMC_DATABLOCK_SIZE_32B) || \
Kojto 122:f9eeca106725 318 ((SIZE) == SDMMC_DATABLOCK_SIZE_64B) || \
Kojto 122:f9eeca106725 319 ((SIZE) == SDMMC_DATABLOCK_SIZE_128B) || \
Kojto 122:f9eeca106725 320 ((SIZE) == SDMMC_DATABLOCK_SIZE_256B) || \
Kojto 122:f9eeca106725 321 ((SIZE) == SDMMC_DATABLOCK_SIZE_512B) || \
Kojto 122:f9eeca106725 322 ((SIZE) == SDMMC_DATABLOCK_SIZE_1024B) || \
Kojto 122:f9eeca106725 323 ((SIZE) == SDMMC_DATABLOCK_SIZE_2048B) || \
Kojto 122:f9eeca106725 324 ((SIZE) == SDMMC_DATABLOCK_SIZE_4096B) || \
Kojto 122:f9eeca106725 325 ((SIZE) == SDMMC_DATABLOCK_SIZE_8192B) || \
Kojto 122:f9eeca106725 326 ((SIZE) == SDMMC_DATABLOCK_SIZE_16384B))
Kojto 122:f9eeca106725 327 /**
Kojto 122:f9eeca106725 328 * @}
Kojto 122:f9eeca106725 329 */
Kojto 122:f9eeca106725 330
Kojto 122:f9eeca106725 331 /** @defgroup SDMMC_LL_Transfer_Direction Transfer Direction
Kojto 122:f9eeca106725 332 * @{
Kojto 122:f9eeca106725 333 */
Kojto 122:f9eeca106725 334 #define SDMMC_TRANSFER_DIR_TO_CARD ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 335 #define SDMMC_TRANSFER_DIR_TO_SDMMC SDMMC_DCTRL_DTDIR
Kojto 122:f9eeca106725 336
Kojto 122:f9eeca106725 337 #define IS_SDMMC_TRANSFER_DIR(DIR) (((DIR) == SDMMC_TRANSFER_DIR_TO_CARD) || \
Kojto 122:f9eeca106725 338 ((DIR) == SDMMC_TRANSFER_DIR_TO_SDMMC))
Kojto 122:f9eeca106725 339 /**
Kojto 122:f9eeca106725 340 * @}
Kojto 122:f9eeca106725 341 */
Kojto 122:f9eeca106725 342
Kojto 122:f9eeca106725 343 /** @defgroup SDMMC_LL_Transfer_Type Transfer Type
Kojto 122:f9eeca106725 344 * @{
Kojto 122:f9eeca106725 345 */
Kojto 122:f9eeca106725 346 #define SDMMC_TRANSFER_MODE_BLOCK ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 347 #define SDMMC_TRANSFER_MODE_STREAM SDMMC_DCTRL_DTMODE
Kojto 122:f9eeca106725 348
Kojto 122:f9eeca106725 349 #define IS_SDMMC_TRANSFER_MODE(MODE) (((MODE) == SDMMC_TRANSFER_MODE_BLOCK) || \
Kojto 122:f9eeca106725 350 ((MODE) == SDMMC_TRANSFER_MODE_STREAM))
Kojto 122:f9eeca106725 351 /**
Kojto 122:f9eeca106725 352 * @}
Kojto 122:f9eeca106725 353 */
Kojto 122:f9eeca106725 354
Kojto 122:f9eeca106725 355 /** @defgroup SDMMC_LL_DPSM_State DPSM State
Kojto 122:f9eeca106725 356 * @{
Kojto 122:f9eeca106725 357 */
Kojto 122:f9eeca106725 358 #define SDMMC_DPSM_DISABLE ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 359 #define SDMMC_DPSM_ENABLE SDMMC_DCTRL_DTEN
Kojto 122:f9eeca106725 360
Kojto 122:f9eeca106725 361 #define IS_SDMMC_DPSM(DPSM) (((DPSM) == SDMMC_DPSM_DISABLE) ||\
Kojto 122:f9eeca106725 362 ((DPSM) == SDMMC_DPSM_ENABLE))
Kojto 122:f9eeca106725 363 /**
Kojto 122:f9eeca106725 364 * @}
Kojto 122:f9eeca106725 365 */
Kojto 122:f9eeca106725 366
Kojto 122:f9eeca106725 367 /** @defgroup SDMMC_LL_Read_Wait_Mode Read Wait Mode
Kojto 122:f9eeca106725 368 * @{
Kojto 122:f9eeca106725 369 */
Kojto 122:f9eeca106725 370 #define SDMMC_READ_WAIT_MODE_DATA2 ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 371 #define SDMMC_READ_WAIT_MODE_CLK (SDMMC_DCTRL_RWMOD)
Kojto 122:f9eeca106725 372
Kojto 122:f9eeca106725 373 #define IS_SDMMC_READWAIT_MODE(MODE) (((MODE) == SDMMC_READ_WAIT_MODE_CLK) || \
Kojto 122:f9eeca106725 374 ((MODE) == SDMMC_READ_WAIT_MODE_DATA2))
Kojto 122:f9eeca106725 375 /**
Kojto 122:f9eeca106725 376 * @}
Kojto 122:f9eeca106725 377 */
Kojto 122:f9eeca106725 378
Kojto 122:f9eeca106725 379 /** @defgroup SDMMC_LL_Interrupt_sources Interrupt Sources
Kojto 122:f9eeca106725 380 * @{
Kojto 122:f9eeca106725 381 */
Kojto 122:f9eeca106725 382 #define SDMMC_IT_CCRCFAIL SDMMC_STA_CCRCFAIL
Kojto 122:f9eeca106725 383 #define SDMMC_IT_DCRCFAIL SDMMC_STA_DCRCFAIL
Kojto 122:f9eeca106725 384 #define SDMMC_IT_CTIMEOUT SDMMC_STA_CTIMEOUT
Kojto 122:f9eeca106725 385 #define SDMMC_IT_DTIMEOUT SDMMC_STA_DTIMEOUT
Kojto 122:f9eeca106725 386 #define SDMMC_IT_TXUNDERR SDMMC_STA_TXUNDERR
Kojto 122:f9eeca106725 387 #define SDMMC_IT_RXOVERR SDMMC_STA_RXOVERR
Kojto 122:f9eeca106725 388 #define SDMMC_IT_CMDREND SDMMC_STA_CMDREND
Kojto 122:f9eeca106725 389 #define SDMMC_IT_CMDSENT SDMMC_STA_CMDSENT
Kojto 122:f9eeca106725 390 #define SDMMC_IT_DATAEND SDMMC_STA_DATAEND
Kojto 122:f9eeca106725 391 #define SDMMC_IT_DBCKEND SDMMC_STA_DBCKEND
Kojto 122:f9eeca106725 392 #define SDMMC_IT_CMDACT SDMMC_STA_CMDACT
Kojto 122:f9eeca106725 393 #define SDMMC_IT_TXACT SDMMC_STA_TXACT
Kojto 122:f9eeca106725 394 #define SDMMC_IT_RXACT SDMMC_STA_RXACT
Kojto 122:f9eeca106725 395 #define SDMMC_IT_TXFIFOHE SDMMC_STA_TXFIFOHE
Kojto 122:f9eeca106725 396 #define SDMMC_IT_RXFIFOHF SDMMC_STA_RXFIFOHF
Kojto 122:f9eeca106725 397 #define SDMMC_IT_TXFIFOF SDMMC_STA_TXFIFOF
Kojto 122:f9eeca106725 398 #define SDMMC_IT_RXFIFOF SDMMC_STA_RXFIFOF
Kojto 122:f9eeca106725 399 #define SDMMC_IT_TXFIFOE SDMMC_STA_TXFIFOE
Kojto 122:f9eeca106725 400 #define SDMMC_IT_RXFIFOE SDMMC_STA_RXFIFOE
Kojto 122:f9eeca106725 401 #define SDMMC_IT_TXDAVL SDMMC_STA_TXDAVL
Kojto 122:f9eeca106725 402 #define SDMMC_IT_RXDAVL SDMMC_STA_RXDAVL
Kojto 122:f9eeca106725 403 #define SDMMC_IT_SDIOIT SDMMC_STA_SDIOIT
Kojto 122:f9eeca106725 404 /**
Kojto 122:f9eeca106725 405 * @}
Kojto 122:f9eeca106725 406 */
Kojto 122:f9eeca106725 407
Kojto 122:f9eeca106725 408 /** @defgroup SDMMC_LL_Flags Flags
Kojto 122:f9eeca106725 409 * @{
Kojto 122:f9eeca106725 410 */
Kojto 122:f9eeca106725 411 #define SDMMC_FLAG_CCRCFAIL SDMMC_STA_CCRCFAIL
Kojto 122:f9eeca106725 412 #define SDMMC_FLAG_DCRCFAIL SDMMC_STA_DCRCFAIL
Kojto 122:f9eeca106725 413 #define SDMMC_FLAG_CTIMEOUT SDMMC_STA_CTIMEOUT
Kojto 122:f9eeca106725 414 #define SDMMC_FLAG_DTIMEOUT SDMMC_STA_DTIMEOUT
Kojto 122:f9eeca106725 415 #define SDMMC_FLAG_TXUNDERR SDMMC_STA_TXUNDERR
Kojto 122:f9eeca106725 416 #define SDMMC_FLAG_RXOVERR SDMMC_STA_RXOVERR
Kojto 122:f9eeca106725 417 #define SDMMC_FLAG_CMDREND SDMMC_STA_CMDREND
Kojto 122:f9eeca106725 418 #define SDMMC_FLAG_CMDSENT SDMMC_STA_CMDSENT
Kojto 122:f9eeca106725 419 #define SDMMC_FLAG_DATAEND SDMMC_STA_DATAEND
Kojto 122:f9eeca106725 420 #define SDMMC_FLAG_DBCKEND SDMMC_STA_DBCKEND
Kojto 122:f9eeca106725 421 #define SDMMC_FLAG_CMDACT SDMMC_STA_CMDACT
Kojto 122:f9eeca106725 422 #define SDMMC_FLAG_TXACT SDMMC_STA_TXACT
Kojto 122:f9eeca106725 423 #define SDMMC_FLAG_RXACT SDMMC_STA_RXACT
Kojto 122:f9eeca106725 424 #define SDMMC_FLAG_TXFIFOHE SDMMC_STA_TXFIFOHE
Kojto 122:f9eeca106725 425 #define SDMMC_FLAG_RXFIFOHF SDMMC_STA_RXFIFOHF
Kojto 122:f9eeca106725 426 #define SDMMC_FLAG_TXFIFOF SDMMC_STA_TXFIFOF
Kojto 122:f9eeca106725 427 #define SDMMC_FLAG_RXFIFOF SDMMC_STA_RXFIFOF
Kojto 122:f9eeca106725 428 #define SDMMC_FLAG_TXFIFOE SDMMC_STA_TXFIFOE
Kojto 122:f9eeca106725 429 #define SDMMC_FLAG_RXFIFOE SDMMC_STA_RXFIFOE
Kojto 122:f9eeca106725 430 #define SDMMC_FLAG_TXDAVL SDMMC_STA_TXDAVL
Kojto 122:f9eeca106725 431 #define SDMMC_FLAG_RXDAVL SDMMC_STA_RXDAVL
Kojto 122:f9eeca106725 432 #define SDMMC_FLAG_SDIOIT SDMMC_STA_SDIOIT
Kojto 122:f9eeca106725 433 /**
Kojto 122:f9eeca106725 434 * @}
Kojto 122:f9eeca106725 435 */
Kojto 122:f9eeca106725 436
Kojto 122:f9eeca106725 437 /**
Kojto 122:f9eeca106725 438 * @}
Kojto 122:f9eeca106725 439 */
Kojto 122:f9eeca106725 440
Kojto 122:f9eeca106725 441 /* Exported macro ------------------------------------------------------------*/
Kojto 122:f9eeca106725 442 /** @defgroup SDMMC_LL_Exported_macros SDMMC_LL Exported Macros
Kojto 122:f9eeca106725 443 * @{
Kojto 122:f9eeca106725 444 */
Kojto 122:f9eeca106725 445
Kojto 122:f9eeca106725 446 /** @defgroup SDMMC_LL_Register Bits And Addresses Definitions
Kojto 122:f9eeca106725 447 * @brief SDMMC_LL registers bit address in the alias region
Kojto 122:f9eeca106725 448 * @{
Kojto 122:f9eeca106725 449 */
Kojto 122:f9eeca106725 450 /* ---------------------- SDMMC registers bit mask --------------------------- */
Kojto 122:f9eeca106725 451 /* --- CLKCR Register ---*/
Kojto 122:f9eeca106725 452 /* CLKCR register clear mask */
Kojto 122:f9eeca106725 453 #define CLKCR_CLEAR_MASK ((uint32_t)(SDMMC_CLKCR_CLKDIV | SDMMC_CLKCR_PWRSAV |\
Kojto 122:f9eeca106725 454 SDMMC_CLKCR_BYPASS | SDMMC_CLKCR_WIDBUS |\
Kojto 122:f9eeca106725 455 SDMMC_CLKCR_NEGEDGE | SDMMC_CLKCR_HWFC_EN))
Kojto 122:f9eeca106725 456
Kojto 122:f9eeca106725 457 /* --- DCTRL Register ---*/
Kojto 122:f9eeca106725 458 /* SDMMC DCTRL Clear Mask */
Kojto 122:f9eeca106725 459 #define DCTRL_CLEAR_MASK ((uint32_t)(SDMMC_DCTRL_DTEN | SDMMC_DCTRL_DTDIR |\
Kojto 122:f9eeca106725 460 SDMMC_DCTRL_DTMODE | SDMMC_DCTRL_DBLOCKSIZE))
Kojto 122:f9eeca106725 461
Kojto 122:f9eeca106725 462 /* --- CMD Register ---*/
Kojto 122:f9eeca106725 463 /* CMD Register clear mask */
Kojto 122:f9eeca106725 464 #define CMD_CLEAR_MASK ((uint32_t)(SDMMC_CMD_CMDINDEX | SDMMC_CMD_WAITRESP |\
Kojto 122:f9eeca106725 465 SDMMC_CMD_WAITINT | SDMMC_CMD_WAITPEND |\
Kojto 122:f9eeca106725 466 SDMMC_CMD_CPSMEN | SDMMC_CMD_SDIOSUSPEND))
Kojto 122:f9eeca106725 467
Kojto 122:f9eeca106725 468 /* SDMMC Intialization Frequency (400KHz max) */
Kojto 122:f9eeca106725 469 #define SDMMC_INIT_CLK_DIV ((uint8_t)0x76)
Kojto 122:f9eeca106725 470
Kojto 122:f9eeca106725 471 /* SDMMC Data Transfer Frequency (25MHz max) */
Kojto 122:f9eeca106725 472 #define SDMMC_TRANSFER_CLK_DIV ((uint8_t)0x0)
Kojto 122:f9eeca106725 473
Kojto 122:f9eeca106725 474 /**
Kojto 122:f9eeca106725 475 * @}
Kojto 122:f9eeca106725 476 */
Kojto 122:f9eeca106725 477
Kojto 122:f9eeca106725 478 /** @defgroup SDMMC_LL_Interrupt_Clock Interrupt And Clock Configuration
Kojto 122:f9eeca106725 479 * @brief macros to handle interrupts and specific clock configurations
Kojto 122:f9eeca106725 480 * @{
Kojto 122:f9eeca106725 481 */
Kojto 122:f9eeca106725 482
Kojto 122:f9eeca106725 483 /**
Kojto 122:f9eeca106725 484 * @brief Enable the SDMMC device.
Kojto 122:f9eeca106725 485 * @param __INSTANCE__: SDMMC Instance
Kojto 122:f9eeca106725 486 * @retval None
Kojto 122:f9eeca106725 487 */
Kojto 122:f9eeca106725 488 #define __SDMMC_ENABLE(__INSTANCE__) ((__INSTANCE__)->CLKCR |= SDMMC_CLKCR_CLKEN)
Kojto 122:f9eeca106725 489
Kojto 122:f9eeca106725 490 /**
Kojto 122:f9eeca106725 491 * @brief Disable the SDMMC device.
Kojto 122:f9eeca106725 492 * @param __INSTANCE__: SDMMC Instance
Kojto 122:f9eeca106725 493 * @retval None
Kojto 122:f9eeca106725 494 */
Kojto 122:f9eeca106725 495 #define __SDMMC_DISABLE(__INSTANCE__) ((__INSTANCE__)->CLKCR &= ~SDMMC_CLKCR_CLKEN)
Kojto 122:f9eeca106725 496
Kojto 122:f9eeca106725 497 /**
Kojto 122:f9eeca106725 498 * @brief Enable the SDMMC DMA transfer.
Kojto 122:f9eeca106725 499 * @param None
Kojto 122:f9eeca106725 500 * @retval None
Kojto 122:f9eeca106725 501 */
Kojto 122:f9eeca106725 502 #define __SDMMC_DMA_ENABLE(__INSTANCE__) ((__INSTANCE__)->DCTRL |= SDMMC_DCTRL_DMAEN)
Kojto 122:f9eeca106725 503 /**
Kojto 122:f9eeca106725 504 * @brief Disable the SDMMC DMA transfer.
Kojto 122:f9eeca106725 505 * @param None
Kojto 122:f9eeca106725 506 * @retval None
Kojto 122:f9eeca106725 507 */
Kojto 122:f9eeca106725 508 #define __SDMMC_DMA_DISABLE(__INSTANCE__) ((__INSTANCE__)->DCTRL &= ~SDMMC_DCTRL_DMAEN)
Kojto 122:f9eeca106725 509
Kojto 122:f9eeca106725 510 /**
Kojto 122:f9eeca106725 511 * @brief Enable the SDMMC device interrupt.
Kojto 122:f9eeca106725 512 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 513 * @param __INTERRUPT__: specifies the SDMMC interrupt sources to be enabled.
Kojto 122:f9eeca106725 514 * This parameter can be one or a combination of the following values:
Kojto 122:f9eeca106725 515 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
Kojto 122:f9eeca106725 516 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
Kojto 122:f9eeca106725 517 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
Kojto 122:f9eeca106725 518 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
Kojto 122:f9eeca106725 519 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
Kojto 122:f9eeca106725 520 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
Kojto 122:f9eeca106725 521 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
Kojto 122:f9eeca106725 522 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
Kojto 122:f9eeca106725 523 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
Kojto 122:f9eeca106725 524 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
Kojto 122:f9eeca106725 525 * @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
Kojto 122:f9eeca106725 526 * @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
Kojto 122:f9eeca106725 527 * @arg SDMMC_IT_RXACT: Data receive in progress interrupt
Kojto 122:f9eeca106725 528 * @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
Kojto 122:f9eeca106725 529 * @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
Kojto 122:f9eeca106725 530 * @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
Kojto 122:f9eeca106725 531 * @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
Kojto 122:f9eeca106725 532 * @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
Kojto 122:f9eeca106725 533 * @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
Kojto 122:f9eeca106725 534 * @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
Kojto 122:f9eeca106725 535 * @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
Kojto 122:f9eeca106725 536 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
Kojto 122:f9eeca106725 537 * @retval None
Kojto 122:f9eeca106725 538 */
Kojto 122:f9eeca106725 539 #define __SDMMC_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->MASK |= (__INTERRUPT__))
Kojto 122:f9eeca106725 540
Kojto 122:f9eeca106725 541 /**
Kojto 122:f9eeca106725 542 * @brief Disable the SDMMC device interrupt.
Kojto 122:f9eeca106725 543 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 544 * @param __INTERRUPT__: specifies the SDMMC interrupt sources to be disabled.
Kojto 122:f9eeca106725 545 * This parameter can be one or a combination of the following values:
Kojto 122:f9eeca106725 546 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
Kojto 122:f9eeca106725 547 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
Kojto 122:f9eeca106725 548 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
Kojto 122:f9eeca106725 549 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
Kojto 122:f9eeca106725 550 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
Kojto 122:f9eeca106725 551 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
Kojto 122:f9eeca106725 552 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
Kojto 122:f9eeca106725 553 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
Kojto 122:f9eeca106725 554 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
Kojto 122:f9eeca106725 555 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
Kojto 122:f9eeca106725 556 * @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
Kojto 122:f9eeca106725 557 * @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
Kojto 122:f9eeca106725 558 * @arg SDMMC_IT_RXACT: Data receive in progress interrupt
Kojto 122:f9eeca106725 559 * @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
Kojto 122:f9eeca106725 560 * @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
Kojto 122:f9eeca106725 561 * @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
Kojto 122:f9eeca106725 562 * @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
Kojto 122:f9eeca106725 563 * @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
Kojto 122:f9eeca106725 564 * @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
Kojto 122:f9eeca106725 565 * @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
Kojto 122:f9eeca106725 566 * @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
Kojto 122:f9eeca106725 567 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
Kojto 122:f9eeca106725 568 * @retval None
Kojto 122:f9eeca106725 569 */
Kojto 122:f9eeca106725 570 #define __SDMMC_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->MASK &= ~(__INTERRUPT__))
Kojto 122:f9eeca106725 571
Kojto 122:f9eeca106725 572 /**
Kojto 122:f9eeca106725 573 * @brief Checks whether the specified SDMMC flag is set or not.
Kojto 122:f9eeca106725 574 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 575 * @param __FLAG__: specifies the flag to check.
Kojto 122:f9eeca106725 576 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 577 * @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)
Kojto 122:f9eeca106725 578 * @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
Kojto 122:f9eeca106725 579 * @arg SDMMC_FLAG_CTIMEOUT: Command response timeout
Kojto 122:f9eeca106725 580 * @arg SDMMC_FLAG_DTIMEOUT: Data timeout
Kojto 122:f9eeca106725 581 * @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error
Kojto 122:f9eeca106725 582 * @arg SDMMC_FLAG_RXOVERR: Received FIFO overrun error
Kojto 122:f9eeca106725 583 * @arg SDMMC_FLAG_CMDREND: Command response received (CRC check passed)
Kojto 122:f9eeca106725 584 * @arg SDMMC_FLAG_CMDSENT: Command sent (no response required)
Kojto 122:f9eeca106725 585 * @arg SDMMC_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero)
Kojto 122:f9eeca106725 586 * @arg SDMMC_FLAG_DBCKEND: Data block sent/received (CRC check passed)
Kojto 122:f9eeca106725 587 * @arg SDMMC_FLAG_CMDACT: Command transfer in progress
Kojto 122:f9eeca106725 588 * @arg SDMMC_FLAG_TXACT: Data transmit in progress
Kojto 122:f9eeca106725 589 * @arg SDMMC_FLAG_RXACT: Data receive in progress
Kojto 122:f9eeca106725 590 * @arg SDMMC_FLAG_TXFIFOHE: Transmit FIFO Half Empty
Kojto 122:f9eeca106725 591 * @arg SDMMC_FLAG_RXFIFOHF: Receive FIFO Half Full
Kojto 122:f9eeca106725 592 * @arg SDMMC_FLAG_TXFIFOF: Transmit FIFO full
Kojto 122:f9eeca106725 593 * @arg SDMMC_FLAG_RXFIFOF: Receive FIFO full
Kojto 122:f9eeca106725 594 * @arg SDMMC_FLAG_TXFIFOE: Transmit FIFO empty
Kojto 122:f9eeca106725 595 * @arg SDMMC_FLAG_RXFIFOE: Receive FIFO empty
Kojto 122:f9eeca106725 596 * @arg SDMMC_FLAG_TXDAVL: Data available in transmit FIFO
Kojto 122:f9eeca106725 597 * @arg SDMMC_FLAG_RXDAVL: Data available in receive FIFO
Kojto 122:f9eeca106725 598 * @arg SDMMC_FLAG_SDMMCIT: SD I/O interrupt received
Kojto 122:f9eeca106725 599 * @retval The new state of SDMMC_FLAG (SET or RESET).
Kojto 122:f9eeca106725 600 */
Kojto 122:f9eeca106725 601 #define __SDMMC_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->STA &(__FLAG__)) != RESET)
Kojto 122:f9eeca106725 602
Kojto 122:f9eeca106725 603
Kojto 122:f9eeca106725 604 /**
Kojto 122:f9eeca106725 605 * @brief Clears the SDMMC pending flags.
Kojto 122:f9eeca106725 606 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 607 * @param __FLAG__: specifies the flag to clear.
Kojto 122:f9eeca106725 608 * This parameter can be one or a combination of the following values:
Kojto 122:f9eeca106725 609 * @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)
Kojto 122:f9eeca106725 610 * @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
Kojto 122:f9eeca106725 611 * @arg SDMMC_FLAG_CTIMEOUT: Command response timeout
Kojto 122:f9eeca106725 612 * @arg SDMMC_FLAG_DTIMEOUT: Data timeout
Kojto 122:f9eeca106725 613 * @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error
Kojto 122:f9eeca106725 614 * @arg SDMMC_FLAG_RXOVERR: Received FIFO overrun error
Kojto 122:f9eeca106725 615 * @arg SDMMC_FLAG_CMDREND: Command response received (CRC check passed)
Kojto 122:f9eeca106725 616 * @arg SDMMC_FLAG_CMDSENT: Command sent (no response required)
Kojto 122:f9eeca106725 617 * @arg SDMMC_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero)
Kojto 122:f9eeca106725 618 * @arg SDMMC_FLAG_DBCKEND: Data block sent/received (CRC check passed)
Kojto 122:f9eeca106725 619 * @arg SDMMC_FLAG_SDMMCIT: SD I/O interrupt received
Kojto 122:f9eeca106725 620 * @retval None
Kojto 122:f9eeca106725 621 */
Kojto 122:f9eeca106725 622 #define __SDMMC_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->ICR = (__FLAG__))
Kojto 122:f9eeca106725 623
Kojto 122:f9eeca106725 624 /**
Kojto 122:f9eeca106725 625 * @brief Checks whether the specified SDMMC interrupt has occurred or not.
Kojto 122:f9eeca106725 626 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 627 * @param __INTERRUPT__: specifies the SDMMC interrupt source to check.
Kojto 122:f9eeca106725 628 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 629 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
Kojto 122:f9eeca106725 630 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
Kojto 122:f9eeca106725 631 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
Kojto 122:f9eeca106725 632 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
Kojto 122:f9eeca106725 633 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
Kojto 122:f9eeca106725 634 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
Kojto 122:f9eeca106725 635 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
Kojto 122:f9eeca106725 636 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
Kojto 122:f9eeca106725 637 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
Kojto 122:f9eeca106725 638 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
Kojto 122:f9eeca106725 639 * @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
Kojto 122:f9eeca106725 640 * @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
Kojto 122:f9eeca106725 641 * @arg SDMMC_IT_RXACT: Data receive in progress interrupt
Kojto 122:f9eeca106725 642 * @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
Kojto 122:f9eeca106725 643 * @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
Kojto 122:f9eeca106725 644 * @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
Kojto 122:f9eeca106725 645 * @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
Kojto 122:f9eeca106725 646 * @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
Kojto 122:f9eeca106725 647 * @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
Kojto 122:f9eeca106725 648 * @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
Kojto 122:f9eeca106725 649 * @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
Kojto 122:f9eeca106725 650 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
Kojto 122:f9eeca106725 651 * @retval The new state of SDMMC_IT (SET or RESET).
Kojto 122:f9eeca106725 652 */
Kojto 122:f9eeca106725 653 #define __SDMMC_GET_IT(__INSTANCE__, __INTERRUPT__) (((__INSTANCE__)->STA &(__INTERRUPT__)) == (__INTERRUPT__))
Kojto 122:f9eeca106725 654
Kojto 122:f9eeca106725 655 /**
Kojto 122:f9eeca106725 656 * @brief Clears the SDMMC's interrupt pending bits.
Kojto 122:f9eeca106725 657 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 658 * @param __INTERRUPT__: specifies the interrupt pending bit to clear.
Kojto 122:f9eeca106725 659 * This parameter can be one or a combination of the following values:
Kojto 122:f9eeca106725 660 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
Kojto 122:f9eeca106725 661 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
Kojto 122:f9eeca106725 662 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
Kojto 122:f9eeca106725 663 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
Kojto 122:f9eeca106725 664 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
Kojto 122:f9eeca106725 665 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
Kojto 122:f9eeca106725 666 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
Kojto 122:f9eeca106725 667 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
Kojto 122:f9eeca106725 668 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDMMC_DCOUNT, is zero) interrupt
Kojto 122:f9eeca106725 669 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
Kojto 122:f9eeca106725 670 * @retval None
Kojto 122:f9eeca106725 671 */
Kojto 122:f9eeca106725 672 #define __SDMMC_CLEAR_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->ICR = (__INTERRUPT__))
Kojto 122:f9eeca106725 673
Kojto 122:f9eeca106725 674 /**
Kojto 122:f9eeca106725 675 * @brief Enable Start the SD I/O Read Wait operation.
Kojto 122:f9eeca106725 676 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 677 * @retval None
Kojto 122:f9eeca106725 678 */
Kojto 122:f9eeca106725 679 #define __SDMMC_START_READWAIT_ENABLE(__INSTANCE__) ((__INSTANCE__)->DCTRL |= SDMMC_DCTRL_RWSTART)
Kojto 122:f9eeca106725 680
Kojto 122:f9eeca106725 681 /**
Kojto 122:f9eeca106725 682 * @brief Disable Start the SD I/O Read Wait operations.
Kojto 122:f9eeca106725 683 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 684 * @retval None
Kojto 122:f9eeca106725 685 */
Kojto 122:f9eeca106725 686 #define __SDMMC_START_READWAIT_DISABLE(__INSTANCE__) ((__INSTANCE__)->DCTRL &= ~SDMMC_DCTRL_RWSTART)
Kojto 122:f9eeca106725 687
Kojto 122:f9eeca106725 688 /**
Kojto 122:f9eeca106725 689 * @brief Enable Start the SD I/O Read Wait operation.
Kojto 122:f9eeca106725 690 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 691 * @retval None
Kojto 122:f9eeca106725 692 */
Kojto 122:f9eeca106725 693 #define __SDMMC_STOP_READWAIT_ENABLE(__INSTANCE__) ((__INSTANCE__)->DCTRL |= SDMMC_DCTRL_RWSTOP)
Kojto 122:f9eeca106725 694
Kojto 122:f9eeca106725 695 /**
Kojto 122:f9eeca106725 696 * @brief Disable Stop the SD I/O Read Wait operations.
Kojto 122:f9eeca106725 697 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 698 * @retval None
Kojto 122:f9eeca106725 699 */
Kojto 122:f9eeca106725 700 #define __SDMMC_STOP_READWAIT_DISABLE(__INSTANCE__) ((__INSTANCE__)->DCTRL &= ~SDMMC_DCTRL_RWSTOP)
Kojto 122:f9eeca106725 701
Kojto 122:f9eeca106725 702 /**
Kojto 122:f9eeca106725 703 * @brief Enable the SD I/O Mode Operation.
Kojto 122:f9eeca106725 704 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 705 * @retval None
Kojto 122:f9eeca106725 706 */
Kojto 122:f9eeca106725 707 #define __SDMMC_OPERATION_ENABLE(__INSTANCE__) ((__INSTANCE__)->DCTRL |= SDMMC_DCTRL_SDIOEN)
Kojto 122:f9eeca106725 708
Kojto 122:f9eeca106725 709 /**
Kojto 122:f9eeca106725 710 * @brief Disable the SD I/O Mode Operation.
Kojto 122:f9eeca106725 711 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 712 * @retval None
Kojto 122:f9eeca106725 713 */
Kojto 122:f9eeca106725 714 #define __SDMMC_OPERATION_DISABLE(__INSTANCE__) ((__INSTANCE__)->DCTRL &= ~SDMMC_DCTRL_SDIOEN)
Kojto 122:f9eeca106725 715
Kojto 122:f9eeca106725 716 /**
Kojto 122:f9eeca106725 717 * @brief Enable the SD I/O Suspend command sending.
Kojto 122:f9eeca106725 718 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 719 * @retval None
Kojto 122:f9eeca106725 720 */
Kojto 122:f9eeca106725 721 #define __SDMMC_SUSPEND_CMD_ENABLE(__INSTANCE__) ((__INSTANCE__)->CMD |= SDMMC_CMD_SDIOSUSPEND)
Kojto 122:f9eeca106725 722
Kojto 122:f9eeca106725 723 /**
Kojto 122:f9eeca106725 724 * @brief Disable the SD I/O Suspend command sending.
Kojto 122:f9eeca106725 725 * @param __INSTANCE__: Pointer to SDMMC register base
Kojto 122:f9eeca106725 726 * @retval None
Kojto 122:f9eeca106725 727 */
Kojto 122:f9eeca106725 728 #define __SDMMC_SUSPEND_CMD_DISABLE(__INSTANCE__) ((__INSTANCE__)->CMD &= ~SDMMC_CMD_SDIOSUSPEND)
Kojto 122:f9eeca106725 729
Kojto 122:f9eeca106725 730 /**
Kojto 122:f9eeca106725 731 * @}
Kojto 122:f9eeca106725 732 */
Kojto 122:f9eeca106725 733
Kojto 122:f9eeca106725 734 /**
Kojto 122:f9eeca106725 735 * @}
Kojto 122:f9eeca106725 736 */
Kojto 122:f9eeca106725 737
Kojto 122:f9eeca106725 738 /* Exported functions --------------------------------------------------------*/
Kojto 122:f9eeca106725 739 /** @addtogroup SDMMC_LL_Exported_Functions
Kojto 122:f9eeca106725 740 * @{
Kojto 122:f9eeca106725 741 */
Kojto 122:f9eeca106725 742
Kojto 122:f9eeca106725 743 /* Initialization/de-initialization functions **********************************/
Kojto 122:f9eeca106725 744 /** @addtogroup HAL_SDMMC_LL_Group1
Kojto 122:f9eeca106725 745 * @{
Kojto 122:f9eeca106725 746 */
Kojto 122:f9eeca106725 747 HAL_StatusTypeDef SDMMC_Init(SDMMC_TypeDef *SDMMCx, SDMMC_InitTypeDef Init);
Kojto 122:f9eeca106725 748 /**
Kojto 122:f9eeca106725 749 * @}
Kojto 122:f9eeca106725 750 */
Kojto 122:f9eeca106725 751
Kojto 122:f9eeca106725 752 /* I/O operation functions *****************************************************/
Kojto 122:f9eeca106725 753 /** @addtogroup HAL_SDMMC_LL_Group2
Kojto 122:f9eeca106725 754 * @{
Kojto 122:f9eeca106725 755 */
Kojto 122:f9eeca106725 756 /* Blocking mode: Polling */
Kojto 122:f9eeca106725 757 uint32_t SDMMC_ReadFIFO(SDMMC_TypeDef *SDMMCx);
Kojto 122:f9eeca106725 758 HAL_StatusTypeDef SDMMC_WriteFIFO(SDMMC_TypeDef *SDMMCx, uint32_t *pWriteData);
Kojto 122:f9eeca106725 759 /**
Kojto 122:f9eeca106725 760 * @}
Kojto 122:f9eeca106725 761 */
Kojto 122:f9eeca106725 762
Kojto 122:f9eeca106725 763 /* Peripheral Control functions ************************************************/
Kojto 122:f9eeca106725 764 /** @addtogroup HAL_SDMMC_LL_Group3
Kojto 122:f9eeca106725 765 * @{
Kojto 122:f9eeca106725 766 */
Kojto 122:f9eeca106725 767 HAL_StatusTypeDef SDMMC_PowerState_ON(SDMMC_TypeDef *SDMMCx);
Kojto 122:f9eeca106725 768 HAL_StatusTypeDef SDMMC_PowerState_OFF(SDMMC_TypeDef *SDMMCx);
Kojto 122:f9eeca106725 769 uint32_t SDMMC_GetPowerState(SDMMC_TypeDef *SDMMCx);
Kojto 122:f9eeca106725 770
Kojto 122:f9eeca106725 771 /* Command path state machine (CPSM) management functions */
Kojto 122:f9eeca106725 772 HAL_StatusTypeDef SDMMC_SendCommand(SDMMC_TypeDef *SDMMCx, SDMMC_CmdInitTypeDef *Command);
Kojto 122:f9eeca106725 773 uint8_t SDMMC_GetCommandResponse(SDMMC_TypeDef *SDMMCx);
Kojto 122:f9eeca106725 774 uint32_t SDMMC_GetResponse(SDMMC_TypeDef *SDMMCx, uint32_t Response);
Kojto 122:f9eeca106725 775
Kojto 122:f9eeca106725 776 /* Data path state machine (DPSM) management functions */
Kojto 122:f9eeca106725 777 HAL_StatusTypeDef SDMMC_DataConfig(SDMMC_TypeDef *SDMMCx, SDMMC_DataInitTypeDef* Data);
Kojto 122:f9eeca106725 778 uint32_t SDMMC_GetDataCounter(SDMMC_TypeDef *SDMMCx);
Kojto 122:f9eeca106725 779 uint32_t SDMMC_GetFIFOCount(SDMMC_TypeDef *SDMMCx);
Kojto 122:f9eeca106725 780
Kojto 122:f9eeca106725 781 /* SDMMC Cards mode management functions */
Kojto 122:f9eeca106725 782 HAL_StatusTypeDef SDMMC_SetSDMMCReadWaitMode(SDMMC_TypeDef *SDMMCx, uint32_t SDMMC_ReadWaitMode);
Kojto 122:f9eeca106725 783
Kojto 122:f9eeca106725 784 /**
Kojto 122:f9eeca106725 785 * @}
Kojto 122:f9eeca106725 786 */
Kojto 122:f9eeca106725 787
Kojto 122:f9eeca106725 788 /**
Kojto 122:f9eeca106725 789 * @}
Kojto 122:f9eeca106725 790 */
Kojto 122:f9eeca106725 791
Kojto 122:f9eeca106725 792 /**
Kojto 122:f9eeca106725 793 * @}
Kojto 122:f9eeca106725 794 */
Kojto 122:f9eeca106725 795
Kojto 122:f9eeca106725 796 /**
Kojto 122:f9eeca106725 797 * @}
Kojto 122:f9eeca106725 798 */
Kojto 122:f9eeca106725 799
Kojto 122:f9eeca106725 800 #endif /* SDMMC1 */
Kojto 122:f9eeca106725 801
Kojto 122:f9eeca106725 802 #ifdef __cplusplus
Kojto 122:f9eeca106725 803 }
Kojto 122:f9eeca106725 804 #endif
Kojto 122:f9eeca106725 805
Kojto 122:f9eeca106725 806 #endif /* __STM32L4xx_LL_SDMMC_H */
Kojto 122:f9eeca106725 807
Kojto 122:f9eeca106725 808 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/