📄 i2c.h
字号:
/* * File: i2c.h * Purpose: I2C buffer structure information * * Notes: */#ifndef __I2C_H__#define __I2C_H__/********************************************************************//* I2C parameters */#define I2C_BUFFER_SIZE (50)#define I2C_TXRX (2)#define I2C_TX (0)#define I2C_RX (1)#define iPORT (0xD2)#define POLLING_MODE#define DEBUG/* Function prototypes */void i2c_master(uint8, uint8);__interrupt__void i2c_handler(void);/* Structure for storing I2C transfer data */typedef struct { int tx_index; /* TX index */ int rx_index; /* RX index */ int data_present; /* Data present flag */ uint16 length; /* Length of the buffer in bytes */ uint8 buf[I2C_BUFFER_SIZE]; /* Data buffer */} I2C_BUFFER;/********************************************************************/#endif /* __I2C_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -