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

📄 eeprom.h

📁 at91rm9200 的rom程序
💻 H
字号:
//*----------------------------------------------------------------------------
//*      ATMEL Microcontroller Software Support  -  ROUSSET  -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name           : eeprom.h
//* Object              :
//*----------------------------------------------------------------------------
#ifndef eeprom_h
#define eeprom_h

#include "periph\twi\lib_twi.h"

#define EEPROM_PAGE_SIZE 			32
#define EEPROM_CLOCK	 			100000

#define ERR_EEPROM_READ				-1
#define ERR_EEPROM_WRITE			-2
#define ERR_EEPROM_READ_PAGE		-3
#define EEPROM_READ_OK				0
#define EEPROM_WRITE_OK				0
#define EEPROM_READ_PAGE_OK			0
#define EEPROM_TIMEOUT_READ			2			/* read timeout in ms */
#define EEPROM_TIMEOUT_WRITE		15			/* write timeout in ms */


extern void EEPROM_Init  (const AT91PS_TWIDesc );
extern int TWI_WriteByte (const AT91PS_TWIDesc, int, char );
extern int TWI_ReadByte  (const AT91PS_TWIDesc, int, char * );
extern int TWI_WritePage (const AT91PS_TWIDesc, int, char * );
extern int EEPROM_SeqRead(const AT91PS_TWIDesc, int, char *, int);
extern int TWI_ReadPage  (const AT91PS_TWIDesc, int, char * );

#endif

⌨️ 快捷键说明

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