mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
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:
@@ -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) | \
|
||||
|
||||
Reference in New Issue
Block a user