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

📄 flash.h~

📁 使用avr--cc2420模块程序,需要原理图的联系 QQ:120304948
💻 H~
字号:
//******************************************************************************
// Copyright (C) 2005, ZEMTEC.COM All Rights Reserved.
//   
//      AT25F1024 读写控制程序
//                                  
//                       
//                                 VCC
//             _________________    |
//   P5_4-> -o|/CS           VCC|---  
//            |                 |
//   P5_7-> --|SO          /HOLD|o- <- P5_5
//            |    AT25F1024    |
//   P5_4-> -o|/WP           SCK|-- <- P5_2
//            |                 |
//          --|GND            SI|-- <- P5_6
//         |   -----------------
//        GND
//
//   MCU: MSP430F449
//
//  AUTHOR:  ecc
//  E-MAIL:  mgyuli@zemtec.com
//  Created: April 2005
//******************************************************************************


#ifndef __FLASH_H__
#define __FLASH_H__

void storage_init();
void flash_set_switch(unsigned long);
/* chip erase */
void ChipErase();
/* Sector ERASE */
void SectorErase(unsigned char *pAdd);
/* read data from memory */
void ReadData(unsigned char *pBuf, unsigned char *pAdd);
/* write data into memory */
void WriteData(unsigned char *pBuf, unsigned char *pAdd);
/* set write enable latch */
void SetWriteEnable();
/* Reset write enable lath */
void ResetWriteEnable();
/* read state register */
unsigned char ReadRDSR(void);
/* Write Status Register */
void WriteWRSR(unsigned char BP0, unsigned char BP1);
/* is flash get ready */
void GetReady();

void flash_init_pin();
void inital_flash(void);
void ReadRDID(void);
unsigned char ReadByte(void);
void WriteByte(unsigned char ch);
#endif

⌨️ 快捷键说明

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