sipeed / bl602-hal

Hardware Abstract Layer for BL602 RISC-V WiFi + BLE SoC in embedded Rust
Other
75 stars 14 forks source link

i2c Transfer and WriteRead #49

Open 9names opened 1 year ago

9names commented 1 year ago

When reading the datasheet I had assumed we can't do multiple operations without a stop bit. But the SDK does look like it supports this. https://github.com/bouffalolab/bouffalo_sdk/blob/7a6e8b07bc2ca242215d655793145d7293b9b100/bsp/common/image_sensor/image_sensor.c#L41-L49 https://github.com/bouffalolab/bouffalo_sdk/blob/7a6e8b07bc2ca242215d655793145d7293b9b100/drivers/lhal/src/bflb_i2c.c#L407-L419

It seems to be related to sub-address size? Need to work out what is required to fix this.