flash.h

来自「用8051采用pwm方式播放 串口语音数据」· C头文件 代码 · 共 43 行

H
43
字号
/********************************************************************************************\
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 + =
减小字号Ctrl + -
显示快捷键?