Blame | Last modification | View Log | Download | RSS feed
ifndef __st7i2cinc ; avoid multiple inclusion__st7i2cinc equ 1savelisting off ; no listing over this file;****************************************************************************;* *;* AS 1.42 - File I2C.INC *;* *;* contains SFR and Bit Definitions for ST7 I2C *;* *;****************************************************************************__defi2c macro BaseI2CCR label Base+$00 ; Control RegisterPE bit I2CCR,5 ; Peripheral enableENGC bit I2CCR,4 ; Enable General CallSTART bit I2CCR,3 ; Generation of a Start conditionACK bit I2CCR,2 ; Acknowledge enableSTOP bit I2CCR,1 ; Generation of a Stop conditionITE bit I2CCR,0 ; Interrupt enableI2CSR1 label Base+$01 ; Status Register 1EVF bit I2CSR1,7 ; Event flagADD10 bit I2CSR1,6 ; 10-bit addressing in Master modeTRA bit I2CSR1,5 ; Transmitter/ReceiverBUSY bit I2CSR1,4 ; Bus busyBTF bit I2CSR1,3 ; Byte transfer finishedADSL bit I2CSR1,2 ; Address matched (Slave mode)M_SL bit I2CSR1,1 ; Master/SlaveSB bit I2CSR1,0 ; Start bit (Master mode)I2CSR2 label Base+$02 ; Status Register 2AF bit I2CSR2,4 ; Acknowledge failureSTOPF bit I2CSR2,3 ; Stop detection (Slave mode)ARLO bit I2CSR2,2 ; Arbitration lostBERR bit I2CSR2,1 ; Bus errorGCAL bit I2CSR2,0 ; General Call (Slave mode)I2CCCR label Base+$03 ; Clock Control RegisterFM_SM bit I2CCCR,7 ; Fast/Standard I2C modeI2COAR1 label Base+$04 ; Own Address Register 1I2COAR2 label Base+$05 ; Own Address Register 2FR bfield I2COAR2,6,2 ; Frequency bitsI2CDR label Base+$06 ; Data Registerendmrestoreendif ; __st7i2cinc