Home » Source Code » MPU6050 (hardware IIC) » stm32f10x_sdio.h

stm32f10x_sdio.h ( File view )

  • By 昱晨 2015-04-27
  • View(s):8
  • Download(s):2
  • Point(s): 0
			/**
  ******************************************************************************
  * @file    stm32f10x_sdio.h
  * @author  MCD Application Team
  * @version V3.5.0
  * @date    11-March-2011
  * @brief   This file contains all the functions prototypes for the SDIO firmware
  *          library.
  ******************************************************************************
  * @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.
  *
  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F10x_SDIO_H
#define __STM32F10x_SDIO_H

#ifdef __cplusplus
 extern "C" {

#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"

/** @addtogroup STM32F10x_StdPeriph_Driver
  * @{

  */

/** @addtogroup SDIO
  * @{

  */

/** @defgroup SDIO_Exported_Types
  * @{

  */

typedef struct
{

  uint32_t SDIO_ClockEdge;            /*!< Specifies the clock transition on which the bit capture is made.
                                           This parameter can be a value of @ref SDIO_Clock_Edge */

  uint32_t SDIO_ClockBypass;          /*!< Specifies whether the SDIO Clock divider bypass is
                                           enabled or disabled.
                                           This parameter can be a value of @ref SDIO_Clock_Bypass */

  uint32_t SDIO_ClockPowerSave;       /*!< Specifies whether SDIO Clock output is enabled or
                                           disabled when the bus is idle.
                                           This parameter can be a value of @ref SDIO_Clock_Power_Save */

  uint32_t SDIO_BusWide;              /*!< Specifies the SDIO bus width.
                                           This parameter can be a value of @ref SDIO_Bus_Wide */

  uint32_t SDIO_HardwareFlowControl;  /*!< Specifies whether the SDIO hardware flow control is enabled or disabled.
                                           This parameter can be a value of @ref SDIO_Hardware_Flow_Control */

  uint8_t SDIO_ClockDiv;              /*!< Specifies the clock frequency of the SDIO controller.
                                           This parameter can be a value between 0x00 and 0xFF. */
                                           

} SDIO_InitTypeDef;

typedef struct
{

  uint32_t SDIO_Argument;  /*!< Specifies the SDIO command argument which is sent
                                to a card as part of a command message. If a command
                                contains an argument, it must be loaded into this register
                                before writing the command to the command register */

  uint32_t SDIO_CmdIndex;  /*!< Specifies the SDIO command index. It must be lower than 0x40. */

  uint32_t SDIO_Response;  /*!< Specifies the SDIO response type.
                                This parameter can be a value of @ref SDIO_Response_Type */

  uint32_t SDIO_Wait;      /*!< Specifies whether SDIO wait-for-interrupt request is enabled or disabled.
                                This parameter can be a value of @ref SDIO_Wait_Interrupt_State */

  uint32_t SDIO_CPSM;      /*!< Specifies whether SDIO Command path state machine (CPSM)
                                is enabled or disabled.
                                This parameter can be a value of @ref SDIO_CPSM_State */

} SDIO_CmdInitTypeDef;

typedef struct
{

  uint32_t SDIO_DataTimeOut;    /*!< Specifies the data timeout period in card bus clock periods. */

  uint32_t SDIO_DataLength;     /*!< Specifies the number of data bytes to be transferred. */
 
  uint32_t SDIO_DataBlockSize;  /*!< Specifies the data block size for block transfer.
                                     This parameter can be a value of @ref SDIO_Data_Block_Size */
 
  uint32_t SDIO_TransferDir;    /*!< Specifies the data transfer direction, whether the transfer
                                     is a read or write.
                                     This parameter can be a value of @ref SDIO_Transfer_Direction */
 
  uint32_t SDIO_TransferMode;   /*!< Specifies whether data transfer is in stream or block mode.
                                     This parameter can be a value of @ref SDIO_Transfer_Type */
 
  uint32_t SDIO_DPSM;           /*!< Specifies whether SDIO Data path state machine (DPSM)
                                     is enabled or disabled.
                                     This parameter can be a value of @ref SDIO_DPSM_State */

} SDIO_DataInitTypeDef;

/**
  * @
}
  */ 

/** @defgroup SDIO_Exported_Constants
  * @{

  */

/** @defgroup SDIO_Clock_Edge 
  * @{

  */

#define SDIO_ClockEdge_Rising               ((uint32_t)0x00000000)
#define SDIO_ClockEdge_Falling              ((uint32_t)0x00002000)
#define IS_SDIO_CLOCK_EDGE(EDGE) (((EDGE) == SDIO_ClockEdge_Rising) || \
                                  ((EDGE) == SDIO_ClockEdge_Falling))
/**
  * @
}
  */

/** @defgroup SDIO_Clock_Bypass 
  * @{

  */

#define SDIO_ClockBypass_Disable             ((uint32_t)0x00000000)
#define SDIO_ClockBypass_Enable              ((uint32_t)0x00000400)    
#define IS_SDIO_CLOCK_BYPASS(BYPASS) (((BYPASS) == SDIO_ClockBypass_Disable) || \
                                     ((BYPASS) == SDIO_ClockBypass_Enable))
/**
  * @
}
  */ 

/** @defgroup SDIO_Clock_Power_Save 
  * @{

  */

#define SDIO_ClockPowerSave_Disable         ((uint32_t)0x00000000)
#define SDIO_ClockPowerSave_Enable          ((uint32_t)0x00000200) 
#define IS_SDIO_CLOCK_POWER_SAVE(SAVE) (((SAVE) == SDIO_ClockPowerSave_Disable) || \
                                        ((SAVE) == SDIO_ClockPowerSave_Enable))
/**
  * @
}
  */

/** @defgroup SDIO_Bus_Wide 
  * @{

  */

#define SDIO_BusWide_1b                     ((uint32_t)0x00000000)
#define SDIO_BusWide_4b                     ((uint32_t)0x00000800)
#define SDIO_BusWide_8b                     ((uint32_t)0x00001000)
#define IS_SDIO_BUS_WIDE(WIDE) (((WIDE) == SDIO_BusWide_1b) || ((WIDE) == SDIO_BusWide_4b) || \
                                ((WIDE) == SDIO_BusWide_8b))

/**
  * @
}
  */

/** @defgroup SDIO_Hardware_Flow_Control 
  * @{

  */

#define SDIO_HardwareFlowControl_Disable    ((uint32_t)0x00000000)
#define SDIO_HardwareFlowControl_Enable     ((uint32_t)0x00004000)
#define IS_SDIO_HARDWARE_FLOW_CONTROL(CONTROL) (((CONTROL) == SDIO_HardwareFlowControl_Disable) || \
                                                ((CONTROL) == SDIO_HardwareFlowControl_Enable))
/**
  * @
}
  */

/** @defgroup SDIO_Power_State 
  * @{

  */

#define SDIO_PowerState_OFF                 ((uint32_t)0x00000000)
#define SDIO_PowerState_ON                  ((uint32_t)0x00000003)
#define IS_SDIO_POWER_STATE(STATE) (((STATE) == SDIO_PowerState_OFF) || ((STATE) == SDIO_PowerState_ON)) 
/**
  * @
}
  */ 


/** @defgroup SDIO_Interrupt_sources 
  * @{

  */

#define SDIO_IT_CCRCFAIL                    ((uint32_t)0x00000001)
#define SDIO_IT_DCRCFAIL                    ((uint32_t)0x00000002)
#define SDIO_IT_CTIMEOUT                    ((uint32_t)0x00000004)
#define SDIO_IT_DTIMEOUT                    ((uint32_t)0x00000008)
#define SDIO_IT_TXUNDERR                    ((uint32_t)0x00000010)
#define SDIO_IT_RXOVERR                     ((uint32_t)0x00000020)
#define SDIO_IT_CMDREND                     ((uint32_t)0x00000040)
#define SDIO_IT_CMDSENT                     ((uint32_t)0x00000080)
#define SDIO_IT_DATAEND                     ((uint32_t)0x00000100)
#define SDIO_IT_STBITERR                    ((uint32_t)0x00000200)
#define SDIO_IT_DBCKEND                     ((uint32_t)0x00000400)
#define SDIO_IT_CMDACT                      ((uint32_t)0x00000800)
#define SDIO_IT_TXACT                       ((uint32_t)0x00001000)
#define SDIO_IT_RXACT                       ((uint32_t)0x00002000)
#define SDIO_IT_TXFIFOHE                    ((uint32_t)0x00004000)
#define SDIO_IT_RXFIFOHF                    ((uint32_t)0x00008000)
#define SDIO_IT_TXFIFOF                     ((uint32_t)0x00010000)
#define SDIO_IT_RXFIFOF                     ((uint32_t)0x00020000)
#define SDIO_IT_TXFIFOE                     ((uint32_t)0x00040000)
#define SDIO_IT_RXFIFOE                     ((uint32_t)0x00080000)
#define SDIO_IT_TXDAVL                      ((uint32_t)0x00100000)
#define SDIO_IT_RXDAVL                      ((uint32_t)0x00200000)
#define SDIO_IT_SDIOIT                      ((uint32_t)0x00400000)
#define SDIO_IT_CEATAEND                    ((uint32_t)0x00800000)
#define IS_SDIO_IT(IT) ((((IT) & (uint32_t)0xFF000000) == 0x00) && ((IT) != (uint32_t)0x00))
/**
  * @
}
  */ 

/** @defgroup SDIO_Command_Index
  * @{

  */

#define IS_SDIO_CMD_INDEX(INDEX)            ((INDEX) < 0x40)
/**
  * @
}
  */

/** @defgroup SDIO_Response_Type 
  * @{

  */

#define SDIO_Response_No                    ((uint32_t)0x00000000)
#define SDIO_Response_Short                 ((uint32_t)0x00000040)
#define SDIO_Response_Long                  ((uint32_t)0x000000C0)
#define IS_SDIO_RESPONSE(RESPONSE) (((RESPONSE) == SDIO_Response_No) || \
                                    ((RESPONSE) == SDIO_Response_Short) || \
                                    ((RESPONSE) == SDIO_Response_Long))
/**
  * @
}
  */

/** @defgroup SDIO_Wait_Interrupt_State 
  * @{

  */

#define SDIO_Wait_No                        ((uint32_t)0x00000000) /*!< SDIO No Wait, TimeOut is enabled */
#define SDIO_Wait_IT                        ((uint32_t)0x00000100) /*!< SDIO Wait Interrupt Request
...
...
(Not finished, please download and read the complete file)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 0

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
01.97 kB
01.97 kB
core_cm3.c16.87 kB2010-06-07 10:25
core_cm3.h83.71 kB2011-02-09 14:59
startup_stm32f10x_hd.s15.14 kB2011-03-10 10:52
stm32f10x.h619.08 kB2011-03-10 10:51
system_stm32f10x.c35.70 kB2011-03-10 10:51
system_stm32f10x.h2.04 kB2011-03-10 10:51
01.97 kB
01.97 kB
misc.h8.77 kB2011-03-10 10:47
stm32f10x_adc.h21.18 kB2011-03-10 10:47
stm32f10x_bkp.h7.38 kB2011-03-10 10:47
stm32f10x_can.h26.91 kB2011-03-10 10:47
stm32f10x_cec.h6.42 kB2011-03-10 10:47
stm32f10x_crc.h2.11 kB2011-03-10 10:47
stm32f10x_dac.h14.88 kB2011-03-10 10:47
stm32f10x_dbgmcu.h3.73 kB2011-03-10 10:47
stm32f10x_dma.h20.27 kB2011-03-10 10:47
stm32f10x_exti.h6.66 kB2011-03-10 10:47
stm32f10x_flash.h24.85 kB2011-03-10 10:47
stm32f10x_fsmc.h26.38 kB2011-03-10 10:47
stm32f10x_gpio.h19.70 kB2011-03-10 10:47
stm32f10x_i2c.h29.33 kB2011-03-10 10:47
stm32f10x_iwdg.h3.74 kB2011-03-10 10:47
stm32f10x_pwr.h4.28 kB2011-03-10 10:47
stm32f10x_rcc.h29.74 kB2011-03-10 10:47
stm32f10x_rtc.h3.77 kB2011-03-10 10:47
stm32f10x_sdio.h21.35 kB2011-03-10 10:47
stm32f10x_spi.h17.31 kB2011-03-10 10:47
stm32f10x_tim.h51.20 kB2011-03-10 10:47
stm32f10x_usart.h16.16 kB2011-03-10 10:47
stm32f10x_wwdg.h2.90 kB2011-03-10 10:47
01.97 kB
misc.c6.88 kB2011-03-10 10:47
stm32f10x_adc.c46.09 kB2011-03-10 10:47
stm32f10x_bkp.c8.26 kB2011-03-10 10:47
stm32f10x_can.c44.05 kB2011-03-10 10:47
stm32f10x_cec.c11.38 kB2011-03-10 10:47
stm32f10x_crc.c3.27 kB2011-03-10 10:47
stm32f10x_dac.c18.64 kB2011-03-10 10:47
stm32f10x_dbgmcu.c5.03 kB2011-03-10 10:47
stm32f10x_dma.c28.91 kB2011-03-10 10:47
stm32f10x_exti.c6.80 kB2011-03-10 10:47
stm32f10x_flash.c61.08 kB2011-03-10 10:47
stm32f10x_fsmc.c34.65 kB2011-03-10 10:47
stm32f10x_gpio.c22.68 kB2011-03-11 17:43
stm32f10x_i2c.c44.71 kB2011-03-10 10:47
stm32f10x_iwdg.c4.80 kB2011-03-10 10:47
stm32f10x_pwr.c8.55 kB2011-03-10 10:47
stm32f10x_rcc.c50.07 kB2011-03-10 10:47
stm32f10x_rtc.c8.40 kB2011-03-10 10:47
stm32f10x_sdio.c28.25 kB2011-03-10 10:47
stm32f10x_spi.c29.52 kB2011-03-10 10:47
stm32f10x_tim.c106.60 kB2011-03-10 10:47
stm32f10x_usart.c37.41 kB2011-03-10 10:47
stm32f10x_wwdg.c5.60 kB2011-03-10 10:47
01.97 kB
01.97 kB
systick.hex18.40 kB2013-08-15 19:23
01.97 kB
I2C_MPU6050.c4.69 kB2013-08-15 19:23
I2C_MPU6050.h1.13 kB2013-08-15 19:10
I2C_MPU6050.uvgui.Orange131.20 kB2013-08-15 19:25
I2C_MPU6050.uvgui.flyleaf66.57 kB2012-06-25 20:54
I2C_MPU6050.uvopt10.45 kB2013-08-15 19:25
I2C_MPU6050.uvproj16.56 kB2013-08-15 19:00
JLink497.00 B2012-06-25 20:12
JLinkSettings.ini375.00 B2012-06-24 14:45
delay.c177.00 B2011-08-10 16:44
delay.h98.00 B2011-08-08 21:03
main.c1.48 kB2013-08-15 19:11
stm32f10x_conf.h3.22 kB2012-06-24 22:12
stm32f10x_it.c4.30 kB2011-04-04 19:03
stm32f10x_it.h2.04 kB2011-04-04 19:03
usart1.c5.33 kB2013-08-15 14:40
usart1.h234.00 B2011-08-05 21:11
keilkilll.bat399.00 B2011-04-23 10:24
...
Sponsored links

stm32f10x_sdio.h (294.78 kB)

Need 0 point
Your Point(s)
Download Download

Download failed? Click here to download one by one.

Tip: this source code project contains 2 packages, please click the allow button on the browser pop-up dialog,after you click the download button.

▪ Click to download this source code directly

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D