annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_pccard.h @ 39:46530453eb01

Increase version number
author Ideenmodellierer
date Sun, 29 Jul 2018 16:17:25 +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_hal_pccard.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 PCCARD 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_HAL_PCCARD_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_PCCARD_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 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 #include "stm32f4xx_ll_fsmc.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 #include "stm32f4xx_ll_fmc.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 /** @addtogroup PCCARD
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
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 /* Exported typedef ----------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 /** @defgroup PCCARD_Exported_Types PCCARD Exported Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 * @brief HAL PCCARD State structures definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 HAL_PCCARD_STATE_RESET = 0x00, /*!< PCCARD peripheral not yet initialized or disabled */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 HAL_PCCARD_STATE_READY = 0x01, /*!< PCCARD peripheral ready */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 HAL_PCCARD_STATE_BUSY = 0x02, /*!< PCCARD peripheral busy */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 HAL_PCCARD_STATE_ERROR = 0x04 /*!< PCCARD peripheral error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 }HAL_PCCARD_StateTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 HAL_PCCARD_STATUS_SUCCESS = 0,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 HAL_PCCARD_STATUS_ONGOING,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 HAL_PCCARD_STATUS_ERROR,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 HAL_PCCARD_STATUS_TIMEOUT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 }HAL_PCCARD_StatusTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 * @brief FMC_PCCARD handle Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 FMC_PCCARD_TypeDef *Instance; /*!< Register base address for PCCARD device */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 FMC_PCCARD_InitTypeDef Init; /*!< PCCARD device control configuration parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 __IO HAL_PCCARD_StateTypeDef State; /*!< PCCARD device access state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 HAL_LockTypeDef Lock; /*!< PCCARD Lock */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 }PCCARD_HandleTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 /** @defgroup PCCARD_Exported_Macros PCCARD Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 /** @brief Reset PCCARD handle state
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 * @param __HANDLE__: specifies the PCCARD handle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 #define __HAL_PCCARD_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_PCCARD_STATE_RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 /** @addtogroup PCCARD_Exported_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 /** @addtogroup PCCARD_Exported_Functions_Group1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 /* Initialization/de-initialization functions **********************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 HAL_StatusTypeDef HAL_PCCARD_Init(PCCARD_HandleTypeDef *hpccard, FMC_NAND_PCC_TimingTypeDef *ComSpaceTiming, FMC_NAND_PCC_TimingTypeDef *AttSpaceTiming, FMC_NAND_PCC_TimingTypeDef *IOSpaceTiming);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 HAL_StatusTypeDef HAL_PCCARD_DeInit(PCCARD_HandleTypeDef *hpccard);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 void HAL_PCCARD_MspInit(PCCARD_HandleTypeDef *hpccard);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 void HAL_PCCARD_MspDeInit(PCCARD_HandleTypeDef *hpccard);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 /** @addtogroup PCCARD_Exported_Functions_Group2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 /* IO operation functions *****************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 HAL_StatusTypeDef HAL_PCCARD_Read_ID(PCCARD_HandleTypeDef *hpccard, uint8_t CompactFlash_ID[], uint8_t *pStatus);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 HAL_StatusTypeDef HAL_PCCARD_Write_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress, uint8_t *pStatus);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t SectorAddress, uint8_t *pStatus);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 HAL_StatusTypeDef HAL_PCCARD_Erase_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t SectorAddress, uint8_t *pStatus);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 HAL_StatusTypeDef HAL_PCCARD_Reset(PCCARD_HandleTypeDef *hpccard);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 void HAL_PCCARD_IRQHandler(PCCARD_HandleTypeDef *hpccard);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 void HAL_PCCARD_ITCallback(PCCARD_HandleTypeDef *hpccard);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 /**
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
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 /** @addtogroup PCCARD_Exported_Functions_Group3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 /* PCCARD State functions *******************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 HAL_PCCARD_StateTypeDef HAL_PCCARD_GetState(PCCARD_HandleTypeDef *hpccard);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 HAL_PCCARD_StatusTypeDef HAL_PCCARD_GetStatus(PCCARD_HandleTypeDef *hpccard);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 HAL_PCCARD_StatusTypeDef HAL_PCCARD_ReadStatus(PCCARD_HandleTypeDef *hpccard);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 * @}
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 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 /* Private constants ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 /** @defgroup PCCARD_Private_Constants PCCARD Private Constants
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 #define PCCARD_DEVICE_ADDRESS ((uint32_t)0x90000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 #define PCCARD_ATTRIBUTE_SPACE_ADDRESS ((uint32_t)0x98000000) /* Attribute space size to @0x9BFF FFFF */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 #define PCCARD_COMMON_SPACE_ADDRESS PCCARD_DEVICE_ADDRESS /* Common space size to @0x93FF FFFF */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 #define PCCARD_IO_SPACE_ADDRESS ((uint32_t)0x9C000000) /* IO space size to @0x9FFF FFFF */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 #define PCCARD_IO_SPACE_PRIMARY_ADDR ((uint32_t)0x9C0001F0) /* IO space size to @0x9FFF FFFF */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 /* Flash-ATA registers description */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 #define ATA_DATA ((uint8_t)0x00) /* Data register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 #define ATA_SECTOR_COUNT ((uint8_t)0x02) /* Sector Count register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 #define ATA_SECTOR_NUMBER ((uint8_t)0x03) /* Sector Number register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 #define ATA_CYLINDER_LOW ((uint8_t)0x04) /* Cylinder low register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 #define ATA_CYLINDER_HIGH ((uint8_t)0x05) /* Cylinder high register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 #define ATA_CARD_HEAD ((uint8_t)0x06) /* Card/Head register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 #define ATA_STATUS_CMD ((uint8_t)0x07) /* Status(read)/Command(write) register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 #define ATA_STATUS_CMD_ALTERNATE ((uint8_t)0x0E) /* Alternate Status(read)/Command(write) register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 #define ATA_COMMON_DATA_AREA ((uint16_t)0x0400) /* Start of data area (for Common access only!) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 /* Flash-ATA commands */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 #define ATA_READ_SECTOR_CMD ((uint8_t)0x20)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 #define ATA_WRITE_SECTOR_CMD ((uint8_t)0x30)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 #define ATA_ERASE_SECTOR_CMD ((uint8_t)0xC0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 #define ATA_IDENTIFY_CMD ((uint8_t)0xEC)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 /* PC Card/Compact Flash status */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 #define PCCARD_TIMEOUT_ERROR ((uint8_t)0x60)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 #define PCCARD_BUSY ((uint8_t)0x80)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 #define PCCARD_PROGR ((uint8_t)0x01)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 #define PCCARD_READY ((uint8_t)0x40)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 #define PCCARD_SECTOR_SIZE ((uint32_t)255) /* In half words */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 /* Compact Flash redefinition */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 #define HAL_CF_Init HAL_PCCARD_Init
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 #define HAL_CF_DeInit HAL_PCCARD_DeInit
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 #define HAL_CF_MspInit HAL_PCCARD_MspInit
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 #define HAL_CF_MspDeInit HAL_PCCARD_MspDeInit
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 #define HAL_CF_Read_ID HAL_PCCARD_Read_ID
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 #define HAL_CF_Write_Sector HAL_PCCARD_Write_Sector
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 #define HAL_CF_Read_Sector HAL_PCCARD_Read_Sector
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 #define HAL_CF_Erase_Sector HAL_PCCARD_Erase_Sector
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 #define HAL_CF_Reset HAL_PCCARD_Reset
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 #define HAL_CF_IRQHandler HAL_PCCARD_IRQHandler
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 #define HAL_CF_ITCallback HAL_PCCARD_ITCallback
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 #define HAL_CF_GetState HAL_PCCARD_GetState
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 #define HAL_CF_GetStatus HAL_PCCARD_GetStatus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 #define HAL_CF_ReadStatus HAL_PCCARD_ReadStatus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 #define HAL_CF_STATUS_SUCCESS HAL_PCCARD_STATUS_SUCCESS
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 #define HAL_CF_STATUS_ONGOING HAL_PCCARD_STATUS_ONGOING
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 #define HAL_CF_STATUS_ERROR HAL_PCCARD_STATUS_ERROR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 #define HAL_CF_STATUS_TIMEOUT HAL_PCCARD_STATUS_TIMEOUT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 #define HAL_CF_StatusTypeDef HAL_PCCARD_StatusTypeDef
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 #define CF_DEVICE_ADDRESS PCCARD_DEVICE_ADDRESS
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 #define CF_ATTRIBUTE_SPACE_ADDRESS PCCARD_ATTRIBUTE_SPACE_ADDRESS
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 #define CF_COMMON_SPACE_ADDRESS PCCARD_COMMON_SPACE_ADDRESS
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 #define CF_IO_SPACE_ADDRESS PCCARD_IO_SPACE_ADDRESS
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 #define CF_IO_SPACE_PRIMARY_ADDR PCCARD_IO_SPACE_PRIMARY_ADDR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 #define CF_TIMEOUT_ERROR PCCARD_TIMEOUT_ERROR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 #define CF_BUSY PCCARD_BUSY
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 #define CF_PROGR PCCARD_PROGR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 #define CF_READY PCCARD_READY
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 #define CF_SECTOR_SIZE PCCARD_SECTOR_SIZE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
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 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 #endif /* __STM32F4xx_HAL_PCCARD_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/