Macros | Functions
stm32f10x_sdio.c File Reference

This file provides all the SDIO firmware functions. More...

#include "stm32f10x_sdio.h"
#include "stm32f10x_rcc.h"
Include dependency graph for stm32f10x_sdio.c:

Go to the source code of this file.

Macros

#define ATACMD_BitNumber   0x0E
 
#define CLKCR_CLEAR_MASK   ((uint32_t)0xFFFF8100)
 
#define CLKCR_CLKEN_BB   (PERIPH_BB_BASE + (CLKCR_OFFSET * 32) + (CLKEN_BitNumber * 4))
 
#define CLKCR_OFFSET   (SDIO_OFFSET + 0x04)
 
#define CLKEN_BitNumber   0x08
 
#define CMD_ATACMD_BB   (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (ATACMD_BitNumber * 4))
 
#define CMD_CLEAR_MASK   ((uint32_t)0xFFFFF800)
 
#define CMD_ENCMDCOMPL_BB   (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (ENCMDCOMPL_BitNumber * 4))
 
#define CMD_NIEN_BB   (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (NIEN_BitNumber * 4))
 
#define CMD_OFFSET   (SDIO_OFFSET + 0x0C)
 
#define CMD_SDIOSUSPEND_BB   (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (SDIOSUSPEND_BitNumber * 4))
 
#define DCTRL_CLEAR_MASK   ((uint32_t)0xFFFFFF08)
 
#define DCTRL_DMAEN_BB   (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (DMAEN_BitNumber * 4))
 
#define DCTRL_OFFSET   (SDIO_OFFSET + 0x2C)
 
#define DCTRL_RWMOD_BB   (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (RWMOD_BitNumber * 4))
 
#define DCTRL_RWSTART_BB   (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (RWSTART_BitNumber * 4))
 
#define DCTRL_RWSTOP_BB   (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (RWSTOP_BitNumber * 4))
 
#define DCTRL_SDIOEN_BB   (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (SDIOEN_BitNumber * 4))
 
#define DMAEN_BitNumber   0x03
 
#define ENCMDCOMPL_BitNumber   0x0C
 
#define NIEN_BitNumber   0x0D
 
#define PWR_PWRCTRL_MASK   ((uint32_t)0xFFFFFFFC)
 
#define RWMOD_BitNumber   0x0A
 
#define RWSTART_BitNumber   0x08
 
#define RWSTOP_BitNumber   0x09
 
#define SDIO_OFFSET   (SDIO_BASE - PERIPH_BASE)
 
#define SDIO_RESP_ADDR   ((uint32_t)(SDIO_BASE + 0x14))
 
#define SDIOEN_BitNumber   0x0B
 
#define SDIOSUSPEND_BitNumber   0x0B
 

Functions

void SDIO_CEATAITCmd (FunctionalState NewState)
 Enables or disables the CE-ATA interrupt. More...
 
void SDIO_ClearFlag (uint32_t SDIO_FLAG)
 Clears the SDIO's pending flags. More...
 
void SDIO_ClearITPendingBit (uint32_t SDIO_IT)
 Clears the SDIO's interrupt pending bits. More...
 
void SDIO_ClockCmd (FunctionalState NewState)
 Enables or disables the SDIO Clock. More...
 
void SDIO_CmdStructInit (SDIO_CmdInitTypeDef *SDIO_CmdInitStruct)
 Fills each SDIO_CmdInitStruct member with its default value. More...
 
void SDIO_CommandCompletionCmd (FunctionalState NewState)
 Enables or disables the command completion signal. More...
 
void SDIO_DataConfig (SDIO_DataInitTypeDef *SDIO_DataInitStruct)
 Initializes the SDIO data path according to the specified parameters in the SDIO_DataInitStruct. More...
 
void SDIO_DataStructInit (SDIO_DataInitTypeDef *SDIO_DataInitStruct)
 Fills each SDIO_DataInitStruct member with its default value. More...
 
void SDIO_DeInit (void)
 Deinitializes the SDIO peripheral registers to their default reset values. More...
 
void SDIO_DMACmd (FunctionalState NewState)
 Enables or disables the SDIO DMA request. More...
 
uint8_t SDIO_GetCommandResponse (void)
 Returns command index of last command for which response received. More...
 
uint32_t SDIO_GetDataCounter (void)
 Returns number of remaining data bytes to be transferred. More...
 
uint32_t SDIO_GetFIFOCount (void)
 Returns the number of words left to be written to or read from FIFO. More...
 
FlagStatus SDIO_GetFlagStatus (uint32_t SDIO_FLAG)
 Checks whether the specified SDIO flag is set or not. More...
 
ITStatus SDIO_GetITStatus (uint32_t SDIO_IT)
 Checks whether the specified SDIO interrupt has occurred or not. More...
 
uint32_t SDIO_GetPowerState (void)
 Gets the power status of the controller. More...
 
uint32_t SDIO_GetResponse (uint32_t SDIO_RESP)
 Returns response received from the card for the last command. More...
 
void SDIO_Init (SDIO_InitTypeDef *SDIO_InitStruct)
 Initializes the SDIO peripheral according to the specified parameters in the SDIO_InitStruct. More...
 
void SDIO_ITConfig (uint32_t SDIO_IT, FunctionalState NewState)
 Enables or disables the SDIO interrupts. More...
 
uint32_t SDIO_ReadData (void)
 Read one data word from Rx FIFO. More...
 
void SDIO_SendCEATACmd (FunctionalState NewState)
 Sends CE-ATA command (CMD61). More...
 
void SDIO_SendCommand (SDIO_CmdInitTypeDef *SDIO_CmdInitStruct)
 Initializes the SDIO Command according to the specified parameters in the SDIO_CmdInitStruct and send the command. More...
 
void SDIO_SendSDIOSuspendCmd (FunctionalState NewState)
 Enables or disables the SD I/O Mode suspend command sending. More...
 
void SDIO_SetPowerState (uint32_t SDIO_PowerState)
 Sets the power status of the controller. More...
 
void SDIO_SetSDIOOperation (FunctionalState NewState)
 Enables or disables the SD I/O Mode Operation. More...
 
void SDIO_SetSDIOReadWaitMode (uint32_t SDIO_ReadWaitMode)
 Sets one of the two options of inserting read wait interval. More...
 
void SDIO_StartSDIOReadWait (FunctionalState NewState)
 Starts the SD I/O Read Wait operation. More...
 
void SDIO_StopSDIOReadWait (FunctionalState NewState)
 Stops the SD I/O Read Wait operation. More...
 
void SDIO_StructInit (SDIO_InitTypeDef *SDIO_InitStruct)
 Fills each SDIO_InitStruct member with its default value. More...
 
void SDIO_WriteData (uint32_t Data)
 Write one data word to Tx FIFO. More...
 

Detailed Description

This file provides all the SDIO firmware functions.

Author
MCD Application Team
Version
V3.5.0
Date
11-March-2011
Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics

Definition in file stm32f10x_sdio.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:27