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

📄 eeprom.h

📁 AVR系列被广泛应用的单片机MEGA8开发(原理图)及例程
💻 H
字号:
/*
**  Header file : eeprom.h
*/
#ifdef _AVR
/* AVR EEPROM access functions */
#ifndef		__EEPROM__H
#define		__EEPROM__H

// These work for devices with more than 256 bytes of EEPROM
int EEPROMwrite( int location, unsigned char);
unsigned char EEPROMread( int);

// These work for devices with 256 or less bytes of EEPROM
int _256EEPROMwrite( int location, unsigned char);
unsigned char _256EEPROMread( int);

void EEPROMReadBytes(int addr, void *ptr, int size);
void EEPROMWriteBytes(int addr, void *ptr, int size);

#define EEPROM_READ(addr, dst)		EEPROMReadBytes(addr, &dst, sizeof (dst))
#define EEPROM_WRITE(addr, src)		EEPROMWriteBytes(addr, &src, sizeof (src))

#endif
#endif

⌨️ 快捷键说明

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