Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Sep 16 15:32:31 2015 +0100
Revision:
107:4f6c30876dfa
Release 107  of the mbed library

Changes:
- new platforms - DISCO_F746NG, DISCO_L476VG, NUCLEO_L476RG
- KL43Z - bugfix RTC init function
- K20 - SPI mode fix

Who changed what in which revision?

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