#ifndef __KH25L6406_H__
#define __KH25L6406_H__
#include "SPI.h"
#include "Project.h"
#include "Delay.h"
/* 定义操作串行Flash所需的数据 */
#define FLASH_ERROR 0
#define FLASH_OK 1
#define ucRead 0x0B // 读数据命令
#define ucIsReadWait 0x01 // 读数据前是否需要发送一个哑字,0表示不需要,其它表示需要
#define ucChipErase 0x60 // 全片擦除命令
#define ucSecErase 0x20 // 扇区擦除命令
#define ucWrite 0x02 // 写数据,即编程命令
#define ucReadStatus 0x05 // 读状态命令
#define ucEnWriteStatus 0x00 // 使能写状态命令
#define ucWriteStatus 0x01 // 写状态命令
#define ucEnWrite 0x06 // 使能写命令
#define ucDisWrite 0x04 // 禁能写命令
#define ucReadJEDEC_ID 0x9F // 读取芯片JEDEC ID命令,一般占用3个字节
#define ucReadProduct_ID 0x90 // 读取芯片产品ID的命令,一般占用2个字节
#define ulID 0xC22017 // 器件的ID
#define ulMaxAddr 0x7FFFFF // 器件最大地址
#d
SPI驱动高速读写
最新推荐文章于 2020-06-15 08:21:32 发布
