Browse files

Always clear i2c low byte (FlightCtrl only sends it when non-zero).

  • Loading branch information...
1 parent 649b556 commit 85e022257619cc22d707bd6815fb0ed6561cc887 @sim- committed Jan 31, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 tgy.asm
1 tgy.asm
@@ -680,6 +680,7 @@ i2c_rx_data: sbrs flags0, I2C_SPACE_LEFT ; Receive buffer has room?
sbrs flags0, I2C_FIRST
rjmp i2c_rx_data1
in rx_h, TWDR ; Receive high byte from bus
+ mov rx_l, ZH ; Zero low byte (we may not receive it)
cbr flags0, (1<<I2C_FIRST)
rjmp i2c_ack
i2c_rx_data1: in rx_l, TWDR ; Receive low byte from bus (MK FlightCtrl "new protocol")

0 comments on commit 85e0222

Please sign in to comment.