mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 17:49:10 -04:00
Access ESP32-S3 I2C FIFO using 32bits
I2C FIFO on ESP32-S3 (and others) MUST be read/written 32bits at a time.
This commit is contained in:
parent
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)
|
static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len)
|
||||||
{
|
{
|
||||||
for (int i = 0; i< len; i++) {
|
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)
|
static inline void i2c_ll_read_rxfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < len; i++) {
|
for(int i = 0; i < len; i++) {
|
||||||
ptr[i] = hw->fifo_data.data;
|
ptr[i] = hw->fifo_data.val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user