fixed mpu9250 not work on i2c bus issue.

1,set rp2040 FIFO_MAX_SIZE to 16.ref: pico sdk ->
static inline size_t i2c_get_write_available(i2c_inst_t *i2c) {
const size_t IC_TX_BUFFER_DEPTH = 16;
return IC_TX_BUFFER_DEPTH - i2c_get_hw(i2c)->txflr;
}
This commit is contained in:
smartether 2022-03-21 10:11:50 +08:00 committed by Xiang Xiao
parent 6b8274fbd8
commit 7fbadb5c16

View File

@ -55,7 +55,7 @@
#define I2C_TIMEOUT (20*1000/CONFIG_USEC_PER_TICK) /* 20 mS */
#define I2C_DEFAULT_FREQUENCY 400000
#define I2C_FIFO_MAX_SIZE 32
#define I2C_FIFO_MAX_SIZE 16
#define I2C_INTR_ENABLE ((RP2040_I2C_IC_INTR_STAT_R_STOP_DET) | \
(RP2040_I2C_IC_INTR_STAT_R_TX_ABRT) | \