mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
a688b95eb6
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1235 ebee16cc-31ac-478f-84a7-5cbb03baadba
59 lines
2.5 KiB
C
59 lines
2.5 KiB
C
/******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
|
|
* File Name : fsmc_nor.h
|
|
* Author : MCD Application Team
|
|
* Version : V3.2.1
|
|
* Date : 07/05/2010
|
|
* Description : Header for fsmc_nor.c file.
|
|
********************************************************************************
|
|
* 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.
|
|
*******************************************************************************/
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
#ifndef __FSMC_NOR_H
|
|
#define __FSMC_NOR_H
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
#include "stm32f10x.h"
|
|
|
|
/* Exported types ------------------------------------------------------------*/
|
|
typedef struct
|
|
{
|
|
uint16_t Manufacturer_Code;
|
|
uint16_t Device_Code1;
|
|
uint16_t Device_Code2;
|
|
uint16_t Device_Code3;
|
|
}NOR_IDTypeDef;
|
|
|
|
/* NOR Status */
|
|
typedef enum
|
|
{
|
|
NOR_SUCCESS = 0,
|
|
NOR_ONGOING,
|
|
NOR_ERROR,
|
|
NOR_TIMEOUT
|
|
}NOR_Status;
|
|
|
|
/* Exported constants --------------------------------------------------------*/
|
|
/* Exported macro ------------------------------------------------------------*/
|
|
/* Exported functions ------------------------------------------------------- */
|
|
void FSMC_NOR_Init(void);
|
|
void FSMC_NOR_ReadID(NOR_IDTypeDef* NOR_ID);
|
|
NOR_Status FSMC_NOR_EraseBlock(uint32_t BlockAddr);
|
|
NOR_Status FSMC_NOR_EraseChip(void);
|
|
NOR_Status FSMC_NOR_WriteHalfWord(uint32_t WriteAddr, uint16_t Data);
|
|
NOR_Status FSMC_NOR_WriteBuffer(uint16_t* pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite);
|
|
NOR_Status FSMC_NOR_ProgramBuffer(uint16_t* pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite);
|
|
uint16_t FSMC_NOR_ReadHalfWord(uint32_t ReadAddr);
|
|
void FSMC_NOR_ReadBuffer(uint16_t* pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead);
|
|
NOR_Status FSMC_NOR_ReturnToReadMode(void);
|
|
NOR_Status FSMC_NOR_Reset(void);
|
|
NOR_Status FSMC_NOR_GetStatus(uint32_t Timeout);
|
|
|
|
#endif /* __FSMC_NOR_H */
|
|
|
|
/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
|