anchor.diff:    i2c.cnt @ 0=
     if
       i2c-POS-0 i2c-ACK-1
  -    i2c-DR@ drop		( Do not understand why I need this )
  +    i2c-DR@ drop                ( Do not understand why I need this )
     then
   ;
   
  
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:   if    \ need to do stop stuff when i2c-xfer could not
      i2c.cnt @
      case
        3 of                      ( prepare for last bytes )
          i2c-EV7_2
          i2c-ACK-0
          i2c-DR@
          -1 i2c.cnt +!
          i2c-stop!
        endof
        2 of
          i2c-DR@
          -1 i2c.cnt +!
          0 i2c.needstop !
          \ no further special handling needed
          \ Last byte follows normal protocol
        endof                     ( default action cnt > 3, simple receive )
        i2c-EV7    \ wait until data received
        i2c-DR@
        -1 i2c.cnt +!
  