📄 nor_private.h
字号:
/*
**********************************************************************
* Micrium, Inc.
* 949 Crestview Circle
* Weston, FL 33327-1848
*
* uC/FS
*
* (c) Copyright 2001 - 2007, Micrium, Inc.
* All rights reserved.
*
***********************************************************************
**** 礐/FS file system for embedded applications ****
礐/FS is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with a license and should not be re-
distributed in any way. We appreciate your understanding and fairness.
----------------------------------------------------------------------
File : NOR_Private.h
Purpose : Private header file for the system-wide generic FLASH driver
---------------------------END-OF-HEADER------------------------------
*/
#ifndef _NOR_PRIVATE_H_ // Avoid multiple/recursive inclusion
#define _NOR_PRIVATE_H_
#include "Global.h"
/*********************************************************************
*
* #define constants
*
**********************************************************************
*/
#ifndef FS_NOR_LINE_SIZE
#define FS_NOR_LINE_SIZE 4 /* Size of a flash line. 4 for most external, bigger for some MCUs. */
/* LPC requires 16 ! */
#endif
#ifndef FS_NOR_CAN_REWRITE
#if FS_NOR_LINE_SIZE > 4
#define FS_NOR_CAN_REWRITE 0 /* Most flash chips can rewrite the same data, as long as 0-bits remain */
#else
#define FS_NOR_CAN_REWRITE 1
#endif
#endif
#ifndef FS_NOR_HUGE // Used for 8/16-bit CPUs only
#define FS_NOR_HUGE
#endif
#ifndef FS_NOR_FAR // Used for 8/16-bit CPUs only
#define FS_NOR_FAR
#endif
/*********************************************************************
*
* Macros, function replacement, interrupt handling
*
**********************************************************************
*/
#ifndef FS_NOR_DI
#define FS_NOR_DI()
#endif
#ifndef FS_NOR_EI
#define FS_NOR_EI()
#endif
/*********************************************************************
*
* Types
*
**********************************************************************
*/
typedef struct FS_NOR_CFI_HW {
int (*pfEraseSectorAMD) (U8 Unit, U32 BaseAddr, U32 SectorAddr);
char (*pfWriteAMD) (U8 Unit, U32 BaseAddr, U32 DestAddr, const U16 FS_NOR_HUGE* pSrc0, int NumItems);
int (*pfEraseSectorINTEL)(U8 Unit, U32 BaseAddr, U32 SectorAddr);
char (*pfWriteINTEL) (U8 Unit, U32 BaseAddr, U32 DestAddr, const U16 FS_NOR_HUGE* pSrc0, int NumItems);
void (*pfReadCFI) (U8 Unit, U32 BaseAddr, U32 Off, U8 * pData, unsigned NumItems);
int (*pfRead) (U8 Unit, void * pDest, U32 Addr, U32 Len);
} FS_NOR_CFI_HW;
/*********************************************************************
*
* Public data
*
**********************************************************************
*/
extern const FS_NOR_CFI_HW FS_NOR_CFI_1x16;
extern const FS_NOR_CFI_HW FS_NOR_CFI_2x16;
#endif // Avoid multiple/recursive inclusion
/*************************** End of file ****************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -