Skip to content

Commit

Permalink
STM32H7: increase i2c slave rx limit.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mathieu Othacehe committed Jan 27, 2022
1 parent 4095c65 commit d408c7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions targets/TARGET_STM/TARGET_STM32H7/objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ struct i2c_s {
volatile uint8_t pending_slave_tx_master_rx;
volatile uint8_t pending_slave_rx_maxter_tx;
uint8_t *slave_rx_buffer;
volatile uint8_t slave_rx_buffer_size;
volatile uint8_t slave_rx_count;
volatile uint16_t slave_rx_buffer_size;
volatile uint16_t slave_rx_count;
#endif
#if DEVICE_I2C_ASYNCH
uint32_t address;
Expand Down

0 comments on commit d408c7d

Please sign in to comment.