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

📄 i2c.h

📁 测试STN LCM产品
💻 H
字号:
// ------------------- head file for i2c.c -------------------------------------
#ifndef __LCD_I2C__
#define __LCD_I2C__

// ---------------- Pins' Definition of I2C Bus --------------------------------
#ifndef I2C_SCL
	#define I2C_SCL P3_1	// Serial Clock
	#define I2C_SDA P3_2	// Serial Data
#endif
// -----------------------------------------------------------------------------

// ------------------------ Function Prototypes --------------------------------
// Start an I2C communication
void I2C_Start(void);
// Stop an I2C Communication
void I2C_Stop(void);
// Send a byte to I2C Bus
void I2C_SendByte(uint8 dByte);
// Read a byte from the slave device
uint8 I2C_ReadByte(void);
// Send an ACK/NACK signal to the Slave device
void I2C_SendAck(bit ACK);
// -----------------------------------------------------------------------------

#include "i2c.c"
#endif

⌨️ 快捷键说明

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