stm3210e_eval_fsmc_nor.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm3210e_eval_fsmc_nor.h
00004   * @author  MCD Application Team
00005   * @version V4.3.0
00006   * @date    10/15/2010
00007   * @brief   This file contains all the functions prototypes for the 
00008   *          stm3210e_eval_fsmc_nor firmware driver.
00009   ******************************************************************************
00010   * @copy
00011   *
00012   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00013   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00014   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00015   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00016   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00017   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00018   *
00019   * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
00020   */ 
00021   
00022 /* Define to prevent recursive inclusion -------------------------------------*/
00023 #ifndef __STM3210E_EVAL_FSMC_NOR_H
00024 #define __STM3210E_EVAL_FSMC_NOR_H
00025 
00026 #ifdef __cplusplus
00027  extern "C" {
00028 #endif
00029 
00030 /* Includes ------------------------------------------------------------------*/
00031 #include "stm32f10x.h"
00032 
00033 /** @addtogroup Utilities
00034   * @{
00035   */
00036   
00037 /** @addtogroup STM32_EVAL
00038   * @{
00039   */ 
00040 
00041 /** @addtogroup STM3210E_EVAL
00042   * @{
00043   */
00044   
00045 /** @addtogroup STM3210E_EVAL_FSMC_NOR
00046   * @{
00047   */  
00048 
00049 /** @defgroup STM3210E_EVAL_FSMC_NOR_Exported_Types
00050   * @{
00051   */
00052 typedef struct
00053 {
00054   uint16_t Manufacturer_Code;
00055   uint16_t Device_Code1;
00056   uint16_t Device_Code2;
00057   uint16_t Device_Code3;
00058 }NOR_IDTypeDef;
00059 
00060 /* NOR Status */
00061 typedef enum
00062 {
00063   NOR_SUCCESS = 0,
00064   NOR_ONGOING,
00065   NOR_ERROR,
00066   NOR_TIMEOUT
00067 }NOR_Status;  
00068 /**
00069   * @}
00070   */
00071   
00072 /** @defgroup STM3210E_EVAL_FSMC_NOR_Exported_Constants
00073   * @{
00074   */ 
00075 /**
00076   * @}
00077   */ 
00078   
00079 /** @defgroup STM3210E_EVAL_FSMC_NOR_Exported_Macros
00080   * @{
00081   */ 
00082 /**
00083   * @}
00084   */ 
00085 
00086 /** @defgroup STM3210E_EVAL_FSMC_NOR_Exported_Functions
00087   * @{
00088   */ 
00089 void NOR_Init(void);
00090 void NOR_ReadID(NOR_IDTypeDef* NOR_ID);
00091 NOR_Status NOR_EraseBlock(uint32_t BlockAddr);
00092 NOR_Status NOR_EraseChip(void);
00093 NOR_Status NOR_WriteHalfWord(uint32_t WriteAddr, uint16_t Data);
00094 NOR_Status NOR_WriteBuffer(uint16_t* pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite);
00095 NOR_Status NOR_ProgramBuffer(uint16_t* pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite);
00096 uint16_t NOR_ReadHalfWord(uint32_t ReadAddr);
00097 void NOR_ReadBuffer(uint16_t* pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead);
00098 NOR_Status NOR_ReturnToReadMode(void);
00099 NOR_Status NOR_Reset(void);
00100 NOR_Status NOR_GetStatus(uint32_t Timeout);
00101 
00102 #ifdef __cplusplus
00103 }
00104 #endif
00105 
00106 #endif /* __STM3210E_EVAL_FSMC_NOR_H */
00107 /**
00108   * @}
00109   */
00110 
00111 /**
00112   * @}
00113   */
00114 
00115 /**
00116   * @}
00117   */
00118 
00119 /**
00120   * @}
00121   */ 
00122 
00123 /**
00124   * @}
00125   */ 
00126 
00127 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32