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

📄 i2cmsu.h

📁 PIC_Hi-Tech_C_Mike_Pearces_I2C_routines Microchi PIC_Hi-Tech C_I2C_for_EEPROM_24LC01B Code
💻 H
字号:
#ifndef I2CMSU_H#define I2CMSU_H/* I2C  Functions  i2c_idle();      -- waits for idle condition on i2c interface  i2c_start();     -- sends start and waits for finish of start  i2c_rstart();     -- sends repeated start and waits for finish of repeated start  extern i2c_stop(); -- sends stop and waits for finish of stop  i2c_ack(unsigned char ackbit); -- do acknowledge  i2c_putbyte(unsigned char byte);  -- sends byte on i2c bus, check idle first  i2c_put(unsigned char byte); -- same as previous, do not check idle  i2c_put_noerr(unsigned char byte); -- do not reset on ack error  unsigned char i2c_getbyte(unsigned char ackbit); -- read byte from i2c bus, do ack   char i2c_ackerr; -- variable that tracks current operation void i2c_print_err();  -- print error message based on i2c_ackerr valueThese functions assume the WatchDogTimer is in operation, and that thei2c_ackerr variable can be used to identify which function was beingexecuted if the WDT timer timeout within one of these functions.*/void i2c_idle(void);void i2c_start(void);void i2c_rstart(void);void i2c_stop(void);void i2c_ack(unsigned char ackbit);unsigned char i2c_putbyte(unsigned char byte);unsigned char i2c_put(unsigned char byte);unsigned char i2c_put_noerr(unsigned char byte);unsigned char i2c_get(unsigned char ackbit);unsigned char i2c_getbyte(unsigned char ackbit);void i2c_print_err(void);extern char i2c_ackerr;#endif

⌨️ 快捷键说明

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