📄 flash.h
字号:
/********************************************************************************************\
name : flash.h
description : export function for serial port flash and dac
author : nauy
data :7/05/07
\********************************************************************************************/
#ifndef _FLASH_H
#define _FLASH_H/*includes*/
#include "..\compiler.h"
#include "..\refd.h"
#include "..\regsnd1.h"
#include <reg51.h>
#define NF_READ_A_AREA_CMD 0x00
#define NF_READ_B_AREA_CMD 0x01
#define NF_READ_C_AREA_CMD 0x50
/************************** Read ID Command *********************************/
#define NF_RESET_CMD 0xff
/************************** Program command *********************************/
#define NF_SEQUENTIAL_DATA_INPUT_CMD 0x80
#define NF_PAGE_PROGRAM_CMD 0x10
/************************** Erase command ***********************************/
#define NF_BLOCK_ERASE_CMD 0x60
#define NF_BLOCK_ERASE_CONFIRM_CMD 0xD0
/************************** Read Status command *****************************/
#define NF_READ_STATUS_CMD 0x70
#define NF_RD_BUSY P2_6
#define Nf_wait_busy {while (!NF_RD_BUSY);}
void flash_read(Uchar idata *pflash);
void flash_write(Uchar idata *pflash);
#endif /*_FLASH_H*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -