Skip to main content
KSlav
Visitor II
September 16, 2019
Question

Hi, i got question about saving multiplies values of reading in function I2C. I got sensors that needs 6 bytes to read before moving to next 6 bytes of data, so i need to save those 6 bytes in array. How to save those data in array? (in my case buffe

  • September 16, 2019
  • 1 reply
  • 537 views
HAL_I2C_Mem_Read(&hi2c1, MAX_READ, FIFO_DATA_REGISTER , I2C_MEMADD_SIZE_8BIT, &buffer, 6 , HAL_MAX_DELAY);
while((HAL_I2C_IsDeviceReady(&hi2c1, MAX_READ, 1 , HAL_MAX_DELAY)) != HAL_OK);

This topic has been closed for replies.

1 reply

S.Ma
Principal
September 16, 2019

Maybe &buffer[0] or simply buffer maybe more appropriate if you want to pass the address of the buffer in memory to fill.