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 buffer)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-09-16 4:12 PM
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);
Labels:
- Labels:
-
I2C
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-09-16 4:57 PM
Maybe &buffer[0] or simply buffer maybe more appropriate if you want to pass the address of the buffer in memory to fill.
