diff options
author | root <root@ka-ata-killa.ourano.james.local> | 2021-03-03 15:24:13 +0000 |
---|---|---|
committer | root <root@ka-ata-killa.ourano.james.local> | 2021-03-03 16:03:28 +0000 |
commit | 49148e76706e5e24c2ba7f6ccc1d7ec4736ab2f3 (patch) | |
tree | f65cb7440711ea1708c25fe78819e9986b2d8566 /app/i2c_hw.c | |
parent | 129a103238d69bd90b4fe9a44bbed943b9488fc2 (diff) | |
download | serial_over_dp-49148e76706e5e24c2ba7f6ccc1d7ec4736ab2f3.tar.gz serial_over_dp-49148e76706e5e24c2ba7f6ccc1d7ec4736ab2f3.tar.bz2 serial_over_dp-49148e76706e5e24c2ba7f6ccc1d7ec4736ab2f3.zip |
support cheap chinese blue pill boards, make usb dfu compatible with dfuse
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); - } } } |