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

📄 i2crtc.h

📁 lcd interface code for lpc214x series micro controllers
💻 H
字号:
#define I2C_ERROR 1                           // these are the values that are stored in i2c_status
#define I2C_OK 2                              // after reading or writing a byte and during an I2C operation
#define I2C_BUSY 0

#define SECONDS 0x02                          // define Real Time Clock register addresses
#define MINUTE 0x03
#define HOUR 0x04
#define DAY 0x05
#define WEEKDAY 0x06
#define MONTH 0x07
#define YEAR 0x08

#define NOMASK 0		                      // define constants to indicate if a register should be masked				  
#define MASK 1                                // or not after reading

extern void init_i2c(void);
extern void rtc_write_byte(unsigned char address, unsigned char byte);
extern unsigned char rtc_read_byte(unsigned char address, unsigned char maskoff);
extern unsigned char i2c_status;

⌨️ 快捷键说明

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