Skip to content

Commit d408c7d

Browse files
author
Mathieu Othacehe
committed
STM32H7: increase i2c slave rx limit.
Use uint16_t variables for i2c slave_rx_buffer_size and slave_rx_count variables. This allows to receive more than 255 bytes in slave mode. The bytes are received one by one in slave mode so there are no hardware limitations forcing a 1 byte rx count limit.
1 parent 4095c65 commit d408c7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

targets/TARGET_STM/TARGET_STM32H7/objects.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ struct i2c_s {
120120
volatile uint8_t pending_slave_tx_master_rx;
121121
volatile uint8_t pending_slave_rx_maxter_tx;
122122
uint8_t *slave_rx_buffer;
123-
volatile uint8_t slave_rx_buffer_size;
124-
volatile uint8_t slave_rx_count;
123+
volatile uint16_t slave_rx_buffer_size;
124+
volatile uint16_t slave_rx_count;
125125
#endif
126126
#if DEVICE_I2C_ASYNCH
127127
uint32_t address;

0 commit comments

Comments
 (0)