📄 dataflash.h
字号:
/******************************************************************
* dataflash.h:
*
* Copyright (c) 2001 Atmel Corporation.
* All Rights Reserved.
*
* You are autorized to use, copy and distribute this software only at
* a single site (the term "site" meaning a single company location).
* This copyright notice must be included in any copy, modification
* or portion of this software merged into another program.
*
* This software is licenced solely for use with Atmel AVR micro
* controller family. The software may not be modified to execute on
* any other microcontroller architectures
*
* This software is provided "as is"; Without warranties either express
* or implied, including any warranty regarding merchantability,
* fitness for a particular purpose or noninfringement.
*
* In no event shall Atmel or its suppliers be liable for any special,
* indirect,incidential or concequential damages resulting from the
* use or inability to use this software.
*
* Revision history:
*
* January 17, 2001: Version 1.0 Created by JB
* July 13, 2001 Version 1.2 JB
* - Changed to IAR compiler V2.25
* - Renamed flash file functions to avoid conflict with
* standard file I/O names
* - Bug fixes in HTTP
* - Speed optimization in TCP
*
*
*******************************************************************/
/*Pin numbers on port. Commented numbers are for AT90S8515*/
#define FLASH_SS 0 //4
#define FLASH_MOSI 2 //5
#define FLASH_MISO 3 //6
#define FLASH_SCK 1 //7
/*Commands for dataflash*/
#define FLASH_MM_PROG_THROUGH_B1 0x82
#define FLASH_MM_READ 0x52
#define FLASH_MM_PAGE_TO_B1 0x53
#define FLASH_B1_TO_MM_PAGE 0x83
#define FLASH_NUMBER_OF_PAGES 1023 //use 1024 when MST is not saved in dataflash
#define FLASH_PAGE_SIZE 264
void read_page(int pageNr, char *buffer, int length);
void write_page(int pageNr, char *buffer);
void copy_page(int toPage, int fromPage);
void EEput(int uiAddress, char cValue);
void EEputInt(int uiAddress, unsigned int cValue);
char EEget(int uiAddress);
unsigned int EEgetInt(int uiAddress);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -