⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flash.h

📁 bootloader源代码
💻 H
字号:
/***************************************** Copyright (c) 2001-2002  Sigma Designs, Inc. All Rights Reserved Proprietary and Confidential *****************************************//* This file is part of the boot loader *//* * flash.h * * flash driver from scratch * following CFI (Common Flash Memory Interface) Specification 2.0 * support multiple flashes * * first revision by Ho Lee 10/31/2002 * code cleanup by Ho Lee 11/08/2002 */#ifndef __BOOTLOADER_FLASH_H#define __BOOTLOADER_FLASH_H#include "config.h"#ifdef SUPPORT_FLASH// error codesenum { FLASH_OK, FLASH_NOTEXIST, FLASH_NOREGION, FLASH_NOTREADY, FLASH_VERIFY_FAIL, FLASH_WRITE_FAULT };// constant definitions#define FLASH_MAX_CHIPSET				2#define FLASH_MAX_ERASE_REGIONS			8//// function prototypes//// init & basicint flash_found(void);int flash_addr_found(unsigned int addr);int flash_init(unsigned int base, int force);// eraseint flash_erase_all(void);int flash_erase_oneblock(unsigned int addr);int flash_erase_region(unsigned int addr, unsigned int len);// read / writeint flash_read_data(unsigned int addr, void *data, int len);int flash_writable(unsigned int addr, int len);int flash_write_onebyte(unsigned int addr, unsigned int data);int flash_write_oneword(unsigned int addr, unsigned int data);int flash_write_data(unsigned int addr, unsigned char *data, int len);// miscellaneousvoid flash_list(void *vpcfi);int flash_calcblock(unsigned int addr, unsigned int *pstart, unsigned int *plen);#endif	// SUPPORT_FLASH#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -