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

📄 at25.h

📁 ICCAVR中所有的库函数源码
💻 H
字号:
/*
**  Header file : at25.h
*/

#ifndef		__AT25__H
#define		__AT25__H

/*
**  Constants for the /CS signal on the SPI EEPROM
**  In this case the PB4 (/SS) pin is used.
*/
#define AT25Enable              PORTB &= 0xE0
#define AT25Disable             PORTB |= 0x10


/*
**  Constants for the status register.
*/
#define BLOCK_PROTECT_NONE      0x00
#define BLOCK_PROTECT_QUARTER   0x04
#define BLOCK_PROTECT_HALF      0x08
#define BLOCK_PROTECT_ALL       0x0C
#define WRITE_PROTECT_ENABLE    0x80
#define WRITE_ENABLE            0x02
#define WRITE_CYCLE_IN_PROGRESS 0x01


void AT25Init(void);
void AT25WriteEnable( void);
void AT25WriteDisable(void);
unsigned char AT25ReadStatusReg(void);
void AT25WriteStatusReg(unsigned char);
unsigned char AT25Read(unsigned int);
void AT25Write(unsigned int, unsigned char);

#endif

/*
**  End of Header file
*/

⌨️ 快捷键说明

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