From 49148e76706e5e24c2ba7f6ccc1d7ec4736ab2f3 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 3 Mar 2021 15:24:13 +0000 Subject: support cheap chinese blue pill boards, make usb dfu compatible with dfuse --- app/i2c_hw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/i2c_hw.c') 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); - } } } -- cgit v1.2.3