i2c_master.h
来自「MSP430F413和ADS1100的接口源码」· C头文件 代码 · 共 22 行
H
22 行
//------------------------------------------------------------------------------
// I2C_Master.h - Header file for I2C_Master.s43
//------------------------------------------------------------------------------
#ifndef I2CMASTER_H
#define I2CMASTER_H
//------------------------------------------------------------------------------
#define PI2C_DIR P2DIR // Define the port where the
#define PI2C_OUT P2OUT // I2C lines are connected to
#define PI2C_IN P2IN
#define SDA (0x01) // Px.0 controls SDA line (pull-up)
#define SCL (0x02) // Px.1 controls SCL line (pull-up)
//------------------------------------------------------------------------------
// Exported functions (for use with C)
//------------------------------------------------------------------------------
#ifdef __STDC__
extern void I2CSetup(void);
extern unsigned int I2CRead16(unsigned char Addr);
extern void I2CWrite8(unsigned char Addr, unsigned char Data);
#endif
//------------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?