i2c: removed use of global variable ticks (no changes in interrupt handler)