anchor.diff:    i2c-EV5
   
     i2c-DR!                   \ Sends address (write mode)
  -  i2c-EV6       		\ wait for completion of addressing or AF
  +  i2c-EV6                       \ wait for completion of addressing or AF
   ;
   
   : i2c-xfer ( u -- nak) \ prepares for an nbyte reply. Use after i2c-addr. Stops i2c after completion.
       dup i2c.cnt !
       case     
         2 of    \ cnt = 2
  -	i2c-start  \ set start bit,  wait for start condition
  -
  -	i2c.addr @ 1 or \ Send address with read bit
  -	i2c-DR!
  -
  -	i2c-POS-1 i2c-ACK-1
  -
  -	i2c-EV6 I2C1-SR2 @ drop \ wait for ADDR and clear
  -	i2c-ACK-0
  -	i2c-SR1-BTF i2c-SR1-wait \ wait for BTF
  -	i2c-stop!                \ set stop without waiting
  -	0 i2c.needstop !
  +        i2c-start  \ set start bit,  wait for start condition
  +
  +        i2c.addr @ 1 or \ Send address with read bit
  +        i2c-DR!
  +
  +        i2c-POS-1 i2c-ACK-1
  +
  +        i2c-EV6 I2C1-SR2 @ drop \ wait for ADDR and clear
  +        i2c-ACK-0
  +        i2c-SR1-BTF i2c-SR1-wait \ wait for BTF
  +        i2c-stop!                \ set stop without waiting
  +        0 i2c.needstop !
         endof
  -      1 of endof		( cnt = 1 )
  -      0 of			( cnt = 0, probe only )
  +      1 of endof                ( cnt = 1 )
  +      0 of                      ( cnt = 0, probe only )
           i2c-nak? i2c-AF-0 i2c-stop
  -	0 i2c.needstop !
  +        0 i2c.needstop !
         endof
         ( default: n > 2 )
  -	i2c-start  \ set start bit,  wait for start condition
  -
  -	i2c.addr @ 1 or \ Send address with read bit
  -	i2c-DR!
  -	i2c-EV6    \ wait until ready to read
  -	\ i2c-SR1-ADDR i2c-SR1-wait
  -	1 i2c.needstop !
  +        i2c-start  \ set start bit,  wait for start condition
  +
  +        i2c.addr @ 1 or \ Send address with read bit
  +        i2c-DR!
  +        i2c-EV6    \ wait until ready to read
  +        \ i2c-SR1-ADDR i2c-SR1-wait
  +        1 i2c.needstop !
       endcase
   ;
   
  
positive.code: 
  : i2c-EV5   i2c-SR1-SB   i2c-SR1-wait ;
  : i2c-EV6   i2c-SR1-ADDR i2c-SR1-AF or
  	                 i2c-SR1-wait
  	    I2C1-SR2 h@ drop ; \ Wait for address sent or AF
  : i2c-EV8_1 i2c-SR1-TxE  i2c-SR1-wait ;
  : i2c-EV7   i2c-SR1-RxNE i2c-SR1-wait ;
  : i2c-EV7_2 i2c-SR1-BTF  i2c-SR1-wait ;
  
negative.code:   i2c.cnt @ 0=
    if
      i2c-POS-0 i2c-ACK-1
      i2c-DR@ drop                ( Do not understand why I need this )
    then
  ;
  
  