i2c.h

来自「Analog 公司 ADE7169 SOC 电表方案DEMO程序」· C头文件 代码 · 共 34 行

H
34
字号
/*
-02/23/2006: Petre M.
  -this file contains declarations of functions and variables used in I2C communication

*/

  void Setup_I2C(void);
  void Tx_byte(char Nr_Bytes, int EEPROM_address,unsigned char __idata  *Pointer);
  void Tx_byte2(void);
  void I2C_Do_nothing(void);
  void Rx_CTRL_byte(void);
  void Rx_byte(void);
  void Tx_CTRL_byte(char Nr_Bytes, int EEPROM_address,unsigned char __idata  *Pointer);

//N=number of bytes read/written in I2C communication
__idata char N;
//X=address where the N bytes are read/written in the EEPROM
__idata int X;

__idata unsigned char __idata  *I2C_ptr;

/*xxxx
      x=Set to 1 when a buffer is read with errors from EEPROM bank1
       x=Set to 1 when a buffer is read with errors from EEPROM bank0
        x=set to 1 when bit1 of SPI2CSTAT is set to 1 (a read/write RX FIFO conflict appeared)
         x=set to 1 when an I2C communication is in progress
*/
__idata char I2C_Status;





⌨️ 快捷键说明

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