annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_ll_sdmmc.h @ 59:00e70b60c69f

language updates
author heinrichsweikamp
date Fri, 10 Aug 2018 19:22:12 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_ll_sdmmc.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief Header file of SDMMC HAL module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #ifndef __STM32F4xx_LL_SDMMC_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_LL_SDMMC_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 #include "stm32f4xx_hal_def.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 /** @addtogroup STM32F4xx_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 /** @addtogroup SDMMC_LL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 /** @defgroup SDMMC_LL_Exported_Types SDMMC_LL Exported Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 * @brief SDMMC Configuration Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 uint32_t ClockEdge; /*!< Specifies the clock transition on which the bit capture is made.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 This parameter can be a value of @ref SDIO_Clock_Edge */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 uint32_t ClockBypass; /*!< Specifies whether the SDIO Clock divider bypass is
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 enabled or disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 This parameter can be a value of @ref SDIO_Clock_Bypass */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 uint32_t ClockPowerSave; /*!< Specifies whether SDIO Clock output is enabled or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 disabled when the bus is idle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 This parameter can be a value of @ref SDIO_Clock_Power_Save */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 uint32_t BusWide; /*!< Specifies the SDIO bus width.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 This parameter can be a value of @ref SDIO_Bus_Wide */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 uint32_t HardwareFlowControl; /*!< Specifies whether the SDIO hardware flow control is enabled or disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 This parameter can be a value of @ref SDIO_Hardware_Flow_Control */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 uint32_t ClockDiv; /*!< Specifies the clock frequency of the SDIO controller.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 }SDIO_InitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 * @brief SDIO Command Control structure
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 uint32_t Argument; /*!< Specifies the SDIO command argument which is sent
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 to a card as part of a command message. If a command
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 contains an argument, it must be loaded into this register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 before writing the command to the command register. */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 uint32_t CmdIndex; /*!< Specifies the SDIO command index. It must be Min_Data = 0 and
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 Max_Data = 64 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 uint32_t Response; /*!< Specifies the SDIO response type.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 This parameter can be a value of @ref SDIO_Response_Type */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 uint32_t WaitForInterrupt; /*!< Specifies whether SDIO wait for interrupt request is
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 enabled or disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 This parameter can be a value of @ref SDIO_Wait_Interrupt_State */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 uint32_t CPSM; /*!< Specifies whether SDIO Command path state machine (CPSM)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 is enabled or disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 This parameter can be a value of @ref SDIO_CPSM_State */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 }SDIO_CmdInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 * @brief SDIO Data Control structure
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 uint32_t DataTimeOut; /*!< Specifies the data timeout period in card bus clock periods. */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 uint32_t DataLength; /*!< Specifies the number of data bytes to be transferred. */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 uint32_t DataBlockSize; /*!< Specifies the data block size for block transfer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 This parameter can be a value of @ref SDIO_Data_Block_Size */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 uint32_t TransferDir; /*!< Specifies the data transfer direction, whether the transfer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 is a read or write.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 This parameter can be a value of @ref SDIO_Transfer_Direction */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 uint32_t TransferMode; /*!< Specifies whether data transfer is in stream or block mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 This parameter can be a value of @ref SDIO_Transfer_Type */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 uint32_t DPSM; /*!< Specifies whether SDIO Data path state machine (DPSM)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 is enabled or disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 This parameter can be a value of @ref SDIO_DPSM_State */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 }SDIO_DataInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 /** @defgroup SDMMC_LL_Exported_Constants SDMMC_LL Exported Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 /** @defgroup SDIO_Clock_Edge Clock Edge
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 #define SDIO_CLOCK_EDGE_RISING ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 #define SDIO_CLOCK_EDGE_FALLING SDIO_CLKCR_NEGEDGE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 #define IS_SDIO_CLOCK_EDGE(EDGE) (((EDGE) == SDIO_CLOCK_EDGE_RISING) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 ((EDGE) == SDIO_CLOCK_EDGE_FALLING))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 /** @defgroup SDIO_Clock_Bypass Clock Bypass
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 #define SDIO_CLOCK_BYPASS_DISABLE ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 #define SDIO_CLOCK_BYPASS_ENABLE SDIO_CLKCR_BYPASS
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 #define IS_SDIO_CLOCK_BYPASS(BYPASS) (((BYPASS) == SDIO_CLOCK_BYPASS_DISABLE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 ((BYPASS) == SDIO_CLOCK_BYPASS_ENABLE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 /** @defgroup SDIO_Clock_Power_Save Clock Power Saving
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 #define SDIO_CLOCK_POWER_SAVE_DISABLE ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 #define SDIO_CLOCK_POWER_SAVE_ENABLE SDIO_CLKCR_PWRSAV
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 #define IS_SDIO_CLOCK_POWER_SAVE(SAVE) (((SAVE) == SDIO_CLOCK_POWER_SAVE_DISABLE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 ((SAVE) == SDIO_CLOCK_POWER_SAVE_ENABLE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 /** @defgroup SDIO_Bus_Wide Bus Width
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 #define SDIO_BUS_WIDE_1B ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 #define SDIO_BUS_WIDE_4B SDIO_CLKCR_WIDBUS_0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 #define SDIO_BUS_WIDE_8B SDIO_CLKCR_WIDBUS_1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 #define IS_SDIO_BUS_WIDE(WIDE) (((WIDE) == SDIO_BUS_WIDE_1B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 ((WIDE) == SDIO_BUS_WIDE_4B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 ((WIDE) == SDIO_BUS_WIDE_8B))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 /** @defgroup SDIO_Hardware_Flow_Control Hardware Flow Control
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 #define SDIO_HARDWARE_FLOW_CONTROL_DISABLE ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 #define SDIO_HARDWARE_FLOW_CONTROL_ENABLE SDIO_CLKCR_HWFC_EN
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 #define IS_SDIO_HARDWARE_FLOW_CONTROL(CONTROL) (((CONTROL) == SDIO_HARDWARE_FLOW_CONTROL_DISABLE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 ((CONTROL) == SDIO_HARDWARE_FLOW_CONTROL_ENABLE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 /** @defgroup SDIO_Clock_Division Clock Division
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 #define IS_SDIO_CLKDIV(DIV) ((DIV) <= 0xFF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 /** @defgroup SDIO_Command_Index Command Index
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 #define IS_SDIO_CMD_INDEX(INDEX) ((INDEX) < 0x40)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 /** @defgroup SDIO_Response_Type Response Type
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 #define SDIO_RESPONSE_NO ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 #define SDIO_RESPONSE_SHORT SDIO_CMD_WAITRESP_0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 #define SDIO_RESPONSE_LONG SDIO_CMD_WAITRESP
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 #define IS_SDIO_RESPONSE(RESPONSE) (((RESPONSE) == SDIO_RESPONSE_NO) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 ((RESPONSE) == SDIO_RESPONSE_SHORT) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 ((RESPONSE) == SDIO_RESPONSE_LONG))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 /** @defgroup SDIO_Wait_Interrupt_State Wait Interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 #define SDIO_WAIT_NO ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 #define SDIO_WAIT_IT SDIO_CMD_WAITINT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 #define SDIO_WAIT_PEND SDIO_CMD_WAITPEND
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 #define IS_SDIO_WAIT(WAIT) (((WAIT) == SDIO_WAIT_NO) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 ((WAIT) == SDIO_WAIT_IT) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 ((WAIT) == SDIO_WAIT_PEND))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 /** @defgroup SDIO_CPSM_State CPSM State
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 #define SDIO_CPSM_DISABLE ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 #define SDIO_CPSM_ENABLE SDIO_CMD_CPSMEN
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 #define IS_SDIO_CPSM(CPSM) (((CPSM) == SDIO_CPSM_DISABLE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 ((CPSM) == SDIO_CPSM_ENABLE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 /** @defgroup SDIO_Response_Registers Response Register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 #define SDIO_RESP1 ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 #define SDIO_RESP2 ((uint32_t)0x00000004)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 #define SDIO_RESP3 ((uint32_t)0x00000008)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 #define SDIO_RESP4 ((uint32_t)0x0000000C)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 #define IS_SDIO_RESP(RESP) (((RESP) == SDIO_RESP1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 ((RESP) == SDIO_RESP2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 ((RESP) == SDIO_RESP3) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 ((RESP) == SDIO_RESP4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 /** @defgroup SDIO_Data_Length Data Lenght
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 #define IS_SDIO_DATA_LENGTH(LENGTH) ((LENGTH) <= 0x01FFFFFF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 /** @defgroup SDIO_Data_Block_Size Data Block Size
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 #define SDIO_DATABLOCK_SIZE_1B ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 #define SDIO_DATABLOCK_SIZE_2B SDIO_DCTRL_DBLOCKSIZE_0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 #define SDIO_DATABLOCK_SIZE_4B SDIO_DCTRL_DBLOCKSIZE_1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 #define SDIO_DATABLOCK_SIZE_8B ((uint32_t)0x00000030)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 #define SDIO_DATABLOCK_SIZE_16B SDIO_DCTRL_DBLOCKSIZE_2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 #define SDIO_DATABLOCK_SIZE_32B ((uint32_t)0x00000050)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 #define SDIO_DATABLOCK_SIZE_64B ((uint32_t)0x00000060)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 #define SDIO_DATABLOCK_SIZE_128B ((uint32_t)0x00000070)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 #define SDIO_DATABLOCK_SIZE_256B SDIO_DCTRL_DBLOCKSIZE_3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 #define SDIO_DATABLOCK_SIZE_512B ((uint32_t)0x00000090)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 #define SDIO_DATABLOCK_SIZE_1024B ((uint32_t)0x000000A0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 #define SDIO_DATABLOCK_SIZE_2048B ((uint32_t)0x000000B0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 #define SDIO_DATABLOCK_SIZE_4096B ((uint32_t)0x000000C0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 #define SDIO_DATABLOCK_SIZE_8192B ((uint32_t)0x000000D0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 #define SDIO_DATABLOCK_SIZE_16384B ((uint32_t)0x000000E0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 #define IS_SDIO_BLOCK_SIZE(SIZE) (((SIZE) == SDIO_DATABLOCK_SIZE_1B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 ((SIZE) == SDIO_DATABLOCK_SIZE_2B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 ((SIZE) == SDIO_DATABLOCK_SIZE_4B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 ((SIZE) == SDIO_DATABLOCK_SIZE_8B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 ((SIZE) == SDIO_DATABLOCK_SIZE_16B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 ((SIZE) == SDIO_DATABLOCK_SIZE_32B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 ((SIZE) == SDIO_DATABLOCK_SIZE_64B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 ((SIZE) == SDIO_DATABLOCK_SIZE_128B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 ((SIZE) == SDIO_DATABLOCK_SIZE_256B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 ((SIZE) == SDIO_DATABLOCK_SIZE_512B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 ((SIZE) == SDIO_DATABLOCK_SIZE_1024B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 ((SIZE) == SDIO_DATABLOCK_SIZE_2048B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 ((SIZE) == SDIO_DATABLOCK_SIZE_4096B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 ((SIZE) == SDIO_DATABLOCK_SIZE_8192B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 ((SIZE) == SDIO_DATABLOCK_SIZE_16384B))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 /** @defgroup SDIO_Transfer_Direction Transfer Direction
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 #define SDIO_TRANSFER_DIR_TO_CARD ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 #define SDIO_TRANSFER_DIR_TO_SDIO SDIO_DCTRL_DTDIR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 #define IS_SDIO_TRANSFER_DIR(DIR) (((DIR) == SDIO_TRANSFER_DIR_TO_CARD) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 ((DIR) == SDIO_TRANSFER_DIR_TO_SDIO))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 /** @defgroup SDIO_Transfer_Type Transfer Type
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 #define SDIO_TRANSFER_MODE_BLOCK ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 #define SDIO_TRANSFER_MODE_STREAM SDIO_DCTRL_DTMODE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 #define IS_SDIO_TRANSFER_MODE(MODE) (((MODE) == SDIO_TRANSFER_MODE_BLOCK) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 ((MODE) == SDIO_TRANSFER_MODE_STREAM))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 /** @defgroup SDIO_DPSM_State DPSM State
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 #define SDIO_DPSM_DISABLE ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 #define SDIO_DPSM_ENABLE SDIO_DCTRL_DTEN
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 #define IS_SDIO_DPSM(DPSM) (((DPSM) == SDIO_DPSM_DISABLE) ||\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 ((DPSM) == SDIO_DPSM_ENABLE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 /** @defgroup SDIO_Read_Wait_Mode Read Wait Mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 #define SDIO_READ_WAIT_MODE_DATA2 ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 #define SDIO_READ_WAIT_MODE_CLK ((uint32_t)0x00000001)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 #define IS_SDIO_READWAIT_MODE(MODE) (((MODE) == SDIO_READ_WAIT_MODE_CLK) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 ((MODE) == SDIO_READ_WAIT_MODE_DATA2))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 /** @defgroup SDIO_Interrupt_sources Interrupt Sources
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 #define SDIO_IT_CCRCFAIL SDIO_STA_CCRCFAIL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 #define SDIO_IT_DCRCFAIL SDIO_STA_DCRCFAIL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 #define SDIO_IT_CTIMEOUT SDIO_STA_CTIMEOUT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 #define SDIO_IT_DTIMEOUT SDIO_STA_DTIMEOUT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 #define SDIO_IT_TXUNDERR SDIO_STA_TXUNDERR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 #define SDIO_IT_RXOVERR SDIO_STA_RXOVERR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 #define SDIO_IT_CMDREND SDIO_STA_CMDREND
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 #define SDIO_IT_CMDSENT SDIO_STA_CMDSENT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 #define SDIO_IT_DATAEND SDIO_STA_DATAEND
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 #define SDIO_IT_STBITERR SDIO_STA_STBITERR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 #define SDIO_IT_DBCKEND SDIO_STA_DBCKEND
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391 #define SDIO_IT_CMDACT SDIO_STA_CMDACT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 #define SDIO_IT_TXACT SDIO_STA_TXACT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393 #define SDIO_IT_RXACT SDIO_STA_RXACT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 #define SDIO_IT_TXFIFOHE SDIO_STA_TXFIFOHE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395 #define SDIO_IT_RXFIFOHF SDIO_STA_RXFIFOHF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 #define SDIO_IT_TXFIFOF SDIO_STA_TXFIFOF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 #define SDIO_IT_RXFIFOF SDIO_STA_RXFIFOF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 #define SDIO_IT_TXFIFOE SDIO_STA_TXFIFOE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 #define SDIO_IT_RXFIFOE SDIO_STA_RXFIFOE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 #define SDIO_IT_TXDAVL SDIO_STA_TXDAVL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 #define SDIO_IT_RXDAVL SDIO_STA_RXDAVL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 #define SDIO_IT_SDIOIT SDIO_STA_SDIOIT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 #define SDIO_IT_CEATAEND SDIO_STA_CEATAEND
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408 /** @defgroup SDIO_Flags Flags
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 #define SDIO_FLAG_CCRCFAIL SDIO_STA_CCRCFAIL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 #define SDIO_FLAG_DCRCFAIL SDIO_STA_DCRCFAIL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413 #define SDIO_FLAG_CTIMEOUT SDIO_STA_CTIMEOUT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 #define SDIO_FLAG_DTIMEOUT SDIO_STA_DTIMEOUT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415 #define SDIO_FLAG_TXUNDERR SDIO_STA_TXUNDERR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 #define SDIO_FLAG_RXOVERR SDIO_STA_RXOVERR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417 #define SDIO_FLAG_CMDREND SDIO_STA_CMDREND
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418 #define SDIO_FLAG_CMDSENT SDIO_STA_CMDSENT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 #define SDIO_FLAG_DATAEND SDIO_STA_DATAEND
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 #define SDIO_FLAG_STBITERR SDIO_STA_STBITERR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 #define SDIO_FLAG_DBCKEND SDIO_STA_DBCKEND
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422 #define SDIO_FLAG_CMDACT SDIO_STA_CMDACT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 #define SDIO_FLAG_TXACT SDIO_STA_TXACT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 #define SDIO_FLAG_RXACT SDIO_STA_RXACT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 #define SDIO_FLAG_TXFIFOHE SDIO_STA_TXFIFOHE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 #define SDIO_FLAG_RXFIFOHF SDIO_STA_RXFIFOHF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427 #define SDIO_FLAG_TXFIFOF SDIO_STA_TXFIFOF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 #define SDIO_FLAG_RXFIFOF SDIO_STA_RXFIFOF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 #define SDIO_FLAG_TXFIFOE SDIO_STA_TXFIFOE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 #define SDIO_FLAG_RXFIFOE SDIO_STA_RXFIFOE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431 #define SDIO_FLAG_TXDAVL SDIO_STA_TXDAVL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 #define SDIO_FLAG_RXDAVL SDIO_STA_RXDAVL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433 #define SDIO_FLAG_SDIOIT SDIO_STA_SDIOIT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 #define SDIO_FLAG_CEATAEND SDIO_STA_CEATAEND
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443 /** @defgroup SDMMC_LL_Exported_macros SDMMC_LL Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447 /** @defgroup SDMMC_LL_Alias_Region Bit Address in the alias region
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450 /* ------------ SDIO registers bit address in the alias region -------------- */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451 #define SDIO_OFFSET (SDIO_BASE - PERIPH_BASE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453 /* --- CLKCR Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454 /* Alias word address of CLKEN bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455 #define CLKCR_OFFSET (SDIO_OFFSET + 0x04)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456 #define CLKEN_BITNUMBER 0x08
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457 #define CLKCR_CLKEN_BB (PERIPH_BB_BASE + (CLKCR_OFFSET * 32) + (CLKEN_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459 /* --- CMD Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460 /* Alias word address of SDIOSUSPEND bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 #define CMD_OFFSET (SDIO_OFFSET + 0x0C)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462 #define SDIOSUSPEND_BITNUMBER 0x0B
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463 #define CMD_SDIOSUSPEND_BB (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (SDIOSUSPEND_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465 /* Alias word address of ENCMDCOMPL bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466 #define ENCMDCOMPL_BITNUMBER 0x0C
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467 #define CMD_ENCMDCOMPL_BB (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (ENCMDCOMPL_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469 /* Alias word address of NIEN bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470 #define NIEN_BITNUMBER 0x0D
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471 #define CMD_NIEN_BB (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (NIEN_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473 /* Alias word address of ATACMD bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 #define ATACMD_BITNUMBER 0x0E
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475 #define CMD_ATACMD_BB (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (ATACMD_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477 /* --- DCTRL Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 /* Alias word address of DMAEN bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479 #define DCTRL_OFFSET (SDIO_OFFSET + 0x2C)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480 #define DMAEN_BITNUMBER 0x03
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481 #define DCTRL_DMAEN_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (DMAEN_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483 /* Alias word address of RWSTART bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484 #define RWSTART_BITNUMBER 0x08
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485 #define DCTRL_RWSTART_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (RWSTART_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487 /* Alias word address of RWSTOP bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 #define RWSTOP_BITNUMBER 0x09
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489 #define DCTRL_RWSTOP_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (RWSTOP_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491 /* Alias word address of RWMOD bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492 #define RWMOD_BITNUMBER 0x0A
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493 #define DCTRL_RWMOD_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (RWMOD_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495 /* Alias word address of SDIOEN bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496 #define SDIOEN_BITNUMBER 0x0B
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497 #define DCTRL_SDIOEN_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (SDIOEN_BITNUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502 /** @defgroup SDMMC_LL_Register Bits And Addresses Definitions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503 * @brief SDMMC_LL registers bit address in the alias region
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 /* ---------------------- SDIO registers bit mask --------------------------- */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508 /* --- CLKCR Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509 /* CLKCR register clear mask */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 #define CLKCR_CLEAR_MASK ((uint32_t)(SDIO_CLKCR_CLKDIV | SDIO_CLKCR_PWRSAV |\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511 SDIO_CLKCR_BYPASS | SDIO_CLKCR_WIDBUS |\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 SDIO_CLKCR_NEGEDGE | SDIO_CLKCR_HWFC_EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514 /* --- PWRCTRL Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515 /* --- DCTRL Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516 /* SDIO DCTRL Clear Mask */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517 #define DCTRL_CLEAR_MASK ((uint32_t)(SDIO_DCTRL_DTEN | SDIO_DCTRL_DTDIR |\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518 SDIO_DCTRL_DTMODE | SDIO_DCTRL_DBLOCKSIZE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520 /* --- CMD Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521 /* CMD Register clear mask */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 #define CMD_CLEAR_MASK ((uint32_t)(SDIO_CMD_CMDINDEX | SDIO_CMD_WAITRESP |\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523 SDIO_CMD_WAITINT | SDIO_CMD_WAITPEND |\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524 SDIO_CMD_CPSMEN | SDIO_CMD_SDIOSUSPEND))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526 /* SDIO RESP Registers Address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527 #define SDIO_RESP_ADDR ((uint32_t)(SDIO_BASE + 0x14))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529 /* SDIO Initialization Frequency (400KHz max) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530 #define SDIO_INIT_CLK_DIV ((uint8_t)0x76)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532 /* SDIO Data Transfer Frequency (25MHz max) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533 #define SDIO_TRANSFER_CLK_DIV ((uint8_t)0x0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
537
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538 /** @defgroup SDMMC_LL_Interrupt_Clock Interrupt And Clock Configuration
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539 * @brief macros to handle interrupts and specific clock configurations
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
541 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
542
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
543 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
544 * @brief Enable the SDIO device.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
545 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
546 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
547 #define __SDIO_ENABLE() (*(__IO uint32_t *)CLKCR_CLKEN_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
548
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
549 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
550 * @brief Disable the SDIO device.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
551 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
552 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
553 #define __SDIO_DISABLE() (*(__IO uint32_t *)CLKCR_CLKEN_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
554
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
555 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
556 * @brief Enable the SDIO DMA transfer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
557 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
558 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
559 #define __SDIO_DMA_ENABLE() (*(__IO uint32_t *)DCTRL_DMAEN_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
560
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
561 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
562 * @brief Disable the SDIO DMA transfer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
563 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
564 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
565 #define __SDIO_DMA_DISABLE() (*(__IO uint32_t *)DCTRL_DMAEN_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
566
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
567 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
568 * @brief Enable the SDIO device interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
569 * @param __INSTANCE__ : Pointer to SDIO register base
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
570 * @param __INTERRUPT__ : specifies the SDIO interrupt sources to be enabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
571 * This parameter can be one or a combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
572 * @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
573 * @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
574 * @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
575 * @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
576 * @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
577 * @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
578 * @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
579 * @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
580 * @arg SDIO_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
581 * @arg SDIO_IT_STBITERR: Start bit not detected on all data signals in wide
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
582 * bus mode interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
583 * @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
584 * @arg SDIO_IT_CMDACT: Command transfer in progress interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
585 * @arg SDIO_IT_TXACT: Data transmit in progress interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
586 * @arg SDIO_IT_RXACT: Data receive in progress interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
587 * @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
588 * @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
589 * @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
590 * @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
591 * @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
592 * @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
593 * @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
594 * @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
595 * @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
596 * @arg SDIO_IT_CEATAEND: CE-ATA command completion signal received for CMD61 interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
597 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
598 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
599 #define __SDIO_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->MASK |= (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
600
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
601 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
602 * @brief Disable the SDIO device interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
603 * @param __INSTANCE__ : Pointer to SDIO register base
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
604 * @param __INTERRUPT__ : specifies the SDIO interrupt sources to be disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
605 * This parameter can be one or a combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
606 * @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
607 * @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
608 * @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
609 * @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
610 * @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
611 * @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
612 * @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
613 * @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
614 * @arg SDIO_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
615 * @arg SDIO_IT_STBITERR: Start bit not detected on all data signals in wide
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
616 * bus mode interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
617 * @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
618 * @arg SDIO_IT_CMDACT: Command transfer in progress interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
619 * @arg SDIO_IT_TXACT: Data transmit in progress interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
620 * @arg SDIO_IT_RXACT: Data receive in progress interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
621 * @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
622 * @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
623 * @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
624 * @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
625 * @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
626 * @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
627 * @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
628 * @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
629 * @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
630 * @arg SDIO_IT_CEATAEND: CE-ATA command completion signal received for CMD61 interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
631 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
632 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
633 #define __SDIO_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->MASK &= ~(__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
634
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
635 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
636 * @brief Checks whether the specified SDIO flag is set or not.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
637 * @param __INSTANCE__ : Pointer to SDIO register base
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
638 * @param __FLAG__: specifies the flag to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
639 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
640 * @arg SDIO_FLAG_CCRCFAIL: Command response received (CRC check failed)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
641 * @arg SDIO_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
642 * @arg SDIO_FLAG_CTIMEOUT: Command response timeout
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
643 * @arg SDIO_FLAG_DTIMEOUT: Data timeout
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
644 * @arg SDIO_FLAG_TXUNDERR: Transmit FIFO underrun error
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
645 * @arg SDIO_FLAG_RXOVERR: Received FIFO overrun error
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
646 * @arg SDIO_FLAG_CMDREND: Command response received (CRC check passed)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
647 * @arg SDIO_FLAG_CMDSENT: Command sent (no response required)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
648 * @arg SDIO_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
649 * @arg SDIO_FLAG_STBITERR: Start bit not detected on all data signals in wide bus mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
650 * @arg SDIO_FLAG_DBCKEND: Data block sent/received (CRC check passed)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
651 * @arg SDIO_FLAG_CMDACT: Command transfer in progress
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
652 * @arg SDIO_FLAG_TXACT: Data transmit in progress
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
653 * @arg SDIO_FLAG_RXACT: Data receive in progress
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
654 * @arg SDIO_FLAG_TXFIFOHE: Transmit FIFO Half Empty
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
655 * @arg SDIO_FLAG_RXFIFOHF: Receive FIFO Half Full
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
656 * @arg SDIO_FLAG_TXFIFOF: Transmit FIFO full
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
657 * @arg SDIO_FLAG_RXFIFOF: Receive FIFO full
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
658 * @arg SDIO_FLAG_TXFIFOE: Transmit FIFO empty
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
659 * @arg SDIO_FLAG_RXFIFOE: Receive FIFO empty
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
660 * @arg SDIO_FLAG_TXDAVL: Data available in transmit FIFO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
661 * @arg SDIO_FLAG_RXDAVL: Data available in receive FIFO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
662 * @arg SDIO_FLAG_SDIOIT: SD I/O interrupt received
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
663 * @arg SDIO_FLAG_CEATAEND: CE-ATA command completion signal received for CMD61
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
664 * @retval The new state of SDIO_FLAG (SET or RESET).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
665 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
666 #define __SDIO_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->STA &(__FLAG__)) != RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
667
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
668
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
669 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
670 * @brief Clears the SDIO pending flags.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
671 * @param __INSTANCE__ : Pointer to SDIO register base
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
672 * @param __FLAG__: specifies the flag to clear.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
673 * This parameter can be one or a combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
674 * @arg SDIO_FLAG_CCRCFAIL: Command response received (CRC check failed)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
675 * @arg SDIO_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
676 * @arg SDIO_FLAG_CTIMEOUT: Command response timeout
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
677 * @arg SDIO_FLAG_DTIMEOUT: Data timeout
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
678 * @arg SDIO_FLAG_TXUNDERR: Transmit FIFO underrun error
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
679 * @arg SDIO_FLAG_RXOVERR: Received FIFO overrun error
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
680 * @arg SDIO_FLAG_CMDREND: Command response received (CRC check passed)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
681 * @arg SDIO_FLAG_CMDSENT: Command sent (no response required)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
682 * @arg SDIO_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
683 * @arg SDIO_FLAG_STBITERR: Start bit not detected on all data signals in wide bus mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
684 * @arg SDIO_FLAG_DBCKEND: Data block sent/received (CRC check passed)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
685 * @arg SDIO_FLAG_SDIOIT: SD I/O interrupt received
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
686 * @arg SDIO_FLAG_CEATAEND: CE-ATA command completion signal received for CMD61
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
687 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
688 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
689 #define __SDIO_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->ICR = (__FLAG__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
690
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
691 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
692 * @brief Checks whether the specified SDIO interrupt has occurred or not.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
693 * @param __INSTANCE__ : Pointer to SDIO register base
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
694 * @param __INTERRUPT__: specifies the SDIO interrupt source to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
695 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
696 * @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
697 * @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
698 * @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
699 * @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
700 * @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
701 * @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
702 * @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
703 * @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
704 * @arg SDIO_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
705 * @arg SDIO_IT_STBITERR: Start bit not detected on all data signals in wide
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
706 * bus mode interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
707 * @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
708 * @arg SDIO_IT_CMDACT: Command transfer in progress interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
709 * @arg SDIO_IT_TXACT: Data transmit in progress interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
710 * @arg SDIO_IT_RXACT: Data receive in progress interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
711 * @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
712 * @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
713 * @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
714 * @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
715 * @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
716 * @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
717 * @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
718 * @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
719 * @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
720 * @arg SDIO_IT_CEATAEND: CE-ATA command completion signal received for CMD61 interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
721 * @retval The new state of SDIO_IT (SET or RESET).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
722 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
723 #define __SDIO_GET_IT (__INSTANCE__, __INTERRUPT__) (((__INSTANCE__)->STA &(__INTERRUPT__)) == (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
724
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
725 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
726 * @brief Clears the SDIO's interrupt pending bits.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
727 * @param __INSTANCE__ : Pointer to SDIO register base
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
728 * @param __INTERRUPT__: specifies the interrupt pending bit to clear.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
729 * This parameter can be one or a combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
730 * @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
731 * @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
732 * @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
733 * @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
734 * @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
735 * @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
736 * @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
737 * @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
738 * @arg SDIO_IT_DATAEND: Data end (data counter, SDIO_DCOUNT, is zero) interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
739 * @arg SDIO_IT_STBITERR: Start bit not detected on all data signals in wide
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
740 * bus mode interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
741 * @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
742 * @arg SDIO_IT_CEATAEND: CE-ATA command completion signal received for CMD61
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
743 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
744 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
745 #define __SDIO_CLEAR_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->ICR = (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
746
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
747 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
748 * @brief Enable Start the SD I/O Read Wait operation.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
749 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
750 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
751 #define __SDIO_START_READWAIT_ENABLE() (*(__IO uint32_t *) DCTRL_RWSTART_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
752
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
753 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
754 * @brief Disable Start the SD I/O Read Wait operations.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
755 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
756 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
757 #define __SDIO_START_READWAIT_DISABLE() (*(__IO uint32_t *) DCTRL_RWSTART_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
758
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
759 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
760 * @brief Enable Start the SD I/O Read Wait operation.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
761 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
762 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
763 #define __SDIO_STOP_READWAIT_ENABLE() (*(__IO uint32_t *) DCTRL_RWSTOP_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
764
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
765 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
766 * @brief Disable Stop the SD I/O Read Wait operations.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
767 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
768 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
769 #define __SDIO_STOP_READWAIT_DISABLE() (*(__IO uint32_t *) DCTRL_RWSTOP_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
770
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
771 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
772 * @brief Enable the SD I/O Mode Operation.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
773 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
774 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
775 #define __SDIO_OPERATION_ENABLE() (*(__IO uint32_t *) DCTRL_SDIOEN_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
776
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
777 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
778 * @brief Disable the SD I/O Mode Operation.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
779 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
780 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
781 #define __SDIO_OPERATION_DISABLE() (*(__IO uint32_t *) DCTRL_SDIOEN_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
782
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
783 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
784 * @brief Enable the SD I/O Suspend command sending.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
785 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
786 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
787 #define __SDIO_SUSPEND_CMD_ENABLE() (*(__IO uint32_t *) CMD_SDIOSUSPEND_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
788
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
789 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
790 * @brief Disable the SD I/O Suspend command sending.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
791 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
792 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
793 #define __SDIO_SUSPEND_CMD_DISABLE() (*(__IO uint32_t *) CMD_SDIOSUSPEND_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
794
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
795 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
796 * @brief Enable the command completion signal.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
797 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
798 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
799 #define __SDIO_CEATA_CMD_COMPLETION_ENABLE() (*(__IO uint32_t *) CMD_ENCMDCOMPL_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
800
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
801 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
802 * @brief Disable the command completion signal.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
803 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
804 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
805 #define __SDIO_CEATA_CMD_COMPLETION_DISABLE() (*(__IO uint32_t *) CMD_ENCMDCOMPL_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
806
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
807 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
808 * @brief Enable the CE-ATA interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
809 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
810 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
811 #define __SDIO_CEATA_ENABLE_IT() (*(__IO uint32_t *) CMD_NIEN_BB = (uint32_t)0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
812
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
813 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
814 * @brief Disable the CE-ATA interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
815 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
816 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
817 #define __SDIO_CEATA_DISABLE_IT() (*(__IO uint32_t *) CMD_NIEN_BB = (uint32_t)1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
818
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
819 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
820 * @brief Enable send CE-ATA command (CMD61).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
821 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
822 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
823 #define __SDIO_CEATA_SENDCMD_ENABLE() (*(__IO uint32_t *) CMD_ATACMD_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
824
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
825 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
826 * @brief Disable send CE-ATA command (CMD61).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
827 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
828 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
829 #define __SDIO_CEATA_SENDCMD_DISABLE() (*(__IO uint32_t *) CMD_ATACMD_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
830
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
831 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
832 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
833 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
834
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
835 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
836 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
837 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
838
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
839 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
840 /** @addtogroup SDMMC_LL_Exported_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
841 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
842 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
843
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
844 /* Initialization/de-initialization functions **********************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
845 /** @addtogroup HAL_SDMMC_LL_Group1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
846 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
847 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
848 HAL_StatusTypeDef SDIO_Init(SDIO_TypeDef *SDIOx, SDIO_InitTypeDef Init);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
849 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
850 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
851 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
852
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
853 /* I/O operation functions *****************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
854 /** @addtogroup HAL_SDMMC_LL_Group2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
855 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
856 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
857 /* Blocking mode: Polling */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
858 uint32_t SDIO_ReadFIFO(SDIO_TypeDef *SDIOx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
859 HAL_StatusTypeDef SDIO_WriteFIFO(SDIO_TypeDef *SDIOx, uint32_t *pWriteData);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
860 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
861 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
862 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
863
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
864 /* Peripheral Control functions ************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
865 /** @addtogroup HAL_SDMMC_LL_Group3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
866 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
867 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
868 HAL_StatusTypeDef SDIO_PowerState_ON(SDIO_TypeDef *SDIOx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
869 HAL_StatusTypeDef SDIO_PowerState_OFF(SDIO_TypeDef *SDIOx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
870 uint32_t SDIO_GetPowerState(SDIO_TypeDef *SDIOx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
871
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
872 /* Command path state machine (CPSM) management functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
873 HAL_StatusTypeDef SDIO_SendCommand(SDIO_TypeDef *SDIOx, SDIO_CmdInitTypeDef *SDIO_CmdInitStruct);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
874 uint8_t SDIO_GetCommandResponse(SDIO_TypeDef *SDIOx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
875 uint32_t SDIO_GetResponse(uint32_t SDIO_RESP);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
876
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
877 /* Data path state machine (DPSM) management functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
878 HAL_StatusTypeDef SDIO_DataConfig(SDIO_TypeDef *SDIOx, SDIO_DataInitTypeDef* SDIO_DataInitStruct);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
879 uint32_t SDIO_GetDataCounter(SDIO_TypeDef *SDIOx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
880 uint32_t SDIO_GetFIFOCount(SDIO_TypeDef *SDIOx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
881
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
882 /* SDIO IO Cards mode management functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
883 HAL_StatusTypeDef SDIO_SetSDIOReadWaitMode(uint32_t SDIO_ReadWaitMode);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
884
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
885 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
886 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
887 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
888
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
889 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
890 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
891 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
892
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
893 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
894 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
895 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
896
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
897 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
898 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
899 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
900
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
901 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
902 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
903 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
904
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
905 #endif /* __STM32F4xx_LL_SDMMC_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
906
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
907 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/