kopia lustrzana https://github.com/espressif/esp-idf
Access ESP32-S3 I2C FIFO using 32bits
I2C FIFO on ESP32-S3 (and others) MUST be read/written 32bits at a time.pull/7041/head
rodzic
7986c970b6
commit
0d0e2851f3
|
@ -571,7 +571,7 @@ static inline void i2c_ll_get_scl_timing(i2c_dev_t *hw, int *high_period, int *l
|
|||
static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len)
|
||||
{
|
||||
for (int i = 0; i< len; i++) {
|
||||
hw->fifo_data.data = ptr[i];
|
||||
hw->fifo_data.val = ptr[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -587,7 +587,7 @@ static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len)
|
|||
static inline void i2c_ll_read_rxfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len)
|
||||
{
|
||||
for(int i = 0; i < len; i++) {
|
||||
ptr[i] = hw->fifo_data.data;
|
||||
ptr[i] = hw->fifo_data.val;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue