at25.h

来自「avr的icc编译器的源代码」· C头文件 代码 · 共 41 行

H
41
字号
/*
**  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 + =
减小字号Ctrl + -
显示快捷键?