Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Utilities/STM32_EVAL/STM3210E_EVAL/stm3210e_eval_fsmc_nor.h @ 0:c59513fd84fb
Initial commit of STM32 test code.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 03 Oct 2011 21:19:15 +1030 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c59513fd84fb |
---|---|
1 /** | |
2 ****************************************************************************** | |
3 * @file stm3210e_eval_fsmc_nor.h | |
4 * @author MCD Application Team | |
5 * @version V4.5.0 | |
6 * @date 07-March-2011 | |
7 * @brief This file contains all the functions prototypes for the | |
8 * stm3210e_eval_fsmc_nor firmware driver. | |
9 ****************************************************************************** | |
10 * @attention | |
11 * | |
12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS | |
13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE | |
14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY | |
15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING | |
16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE | |
17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. | |
18 * | |
19 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2> | |
20 ****************************************************************************** | |
21 */ | |
22 | |
23 /* Define to prevent recursive inclusion -------------------------------------*/ | |
24 #ifndef __STM3210E_EVAL_FSMC_NOR_H | |
25 #define __STM3210E_EVAL_FSMC_NOR_H | |
26 | |
27 #ifdef __cplusplus | |
28 extern "C" { | |
29 #endif | |
30 | |
31 /* Includes ------------------------------------------------------------------*/ | |
32 #include "stm32f10x.h" | |
33 | |
34 /** @addtogroup Utilities | |
35 * @{ | |
36 */ | |
37 | |
38 /** @addtogroup STM32_EVAL | |
39 * @{ | |
40 */ | |
41 | |
42 /** @addtogroup STM3210E_EVAL | |
43 * @{ | |
44 */ | |
45 | |
46 /** @addtogroup STM3210E_EVAL_FSMC_NOR | |
47 * @{ | |
48 */ | |
49 | |
50 /** @defgroup STM3210E_EVAL_FSMC_NOR_Exported_Types | |
51 * @{ | |
52 */ | |
53 typedef struct | |
54 { | |
55 uint16_t Manufacturer_Code; | |
56 uint16_t Device_Code1; | |
57 uint16_t Device_Code2; | |
58 uint16_t Device_Code3; | |
59 }NOR_IDTypeDef; | |
60 | |
61 /* NOR Status */ | |
62 typedef enum | |
63 { | |
64 NOR_SUCCESS = 0, | |
65 NOR_ONGOING, | |
66 NOR_ERROR, | |
67 NOR_TIMEOUT | |
68 }NOR_Status; | |
69 /** | |
70 * @} | |
71 */ | |
72 | |
73 /** @defgroup STM3210E_EVAL_FSMC_NOR_Exported_Constants | |
74 * @{ | |
75 */ | |
76 /** | |
77 * @} | |
78 */ | |
79 | |
80 /** @defgroup STM3210E_EVAL_FSMC_NOR_Exported_Macros | |
81 * @{ | |
82 */ | |
83 /** | |
84 * @} | |
85 */ | |
86 | |
87 /** @defgroup STM3210E_EVAL_FSMC_NOR_Exported_Functions | |
88 * @{ | |
89 */ | |
90 void NOR_Init(void); | |
91 void NOR_ReadID(NOR_IDTypeDef* NOR_ID); | |
92 NOR_Status NOR_EraseBlock(uint32_t BlockAddr); | |
93 NOR_Status NOR_EraseChip(void); | |
94 NOR_Status NOR_WriteHalfWord(uint32_t WriteAddr, uint16_t Data); | |
95 NOR_Status NOR_WriteBuffer(uint16_t* pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite); | |
96 NOR_Status NOR_ProgramBuffer(uint16_t* pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite); | |
97 uint16_t NOR_ReadHalfWord(uint32_t ReadAddr); | |
98 void NOR_ReadBuffer(uint16_t* pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead); | |
99 NOR_Status NOR_ReturnToReadMode(void); | |
100 NOR_Status NOR_Reset(void); | |
101 NOR_Status NOR_GetStatus(uint32_t Timeout); | |
102 | |
103 #ifdef __cplusplus | |
104 } | |
105 #endif | |
106 | |
107 #endif /* __STM3210E_EVAL_FSMC_NOR_H */ | |
108 /** | |
109 * @} | |
110 */ | |
111 | |
112 /** | |
113 * @} | |
114 */ | |
115 | |
116 /** | |
117 * @} | |
118 */ | |
119 | |
120 /** | |
121 * @} | |
122 */ | |
123 | |
124 /** | |
125 * @} | |
126 */ | |
127 | |
128 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ |