diff options
Diffstat (limited to 'app/i2c_hw.c')
-rw-r--r-- | app/i2c_hw.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/i2c_hw.c b/app/i2c_hw.c index 11e796e..9b77009 100644 --- a/app/i2c_hw.c +++ b/app/i2c_hw.c @@ -34,11 +34,11 @@ void i2c1_ev_isr (void) } if (sr1 & I2C_SR1_TxE) { - if (device) { + if (device) v = ddc_read (reg++); - } else { + + else v = vuart_read (reg++); - } I2C_DR (I2C) = v; } @@ -50,11 +50,11 @@ void i2c1_ev_isr (void) reg = v; next_is_reg = 0; } else { - if (reg == 0x10) { + if (reg == 0x10) vuart_write (0, v); - } else { + + else vuart_write (reg++, v); - } } } |