STM32 HAL I2C
Good morning, I'm having trouble understanding how to solve a problem.
there is already a software developed in keil 4, but we need to change some things but now we will use keil 5 with the hal library, so far ok without problems.
my first problem was with the i2c which is ready but uses 4 eeprom 24aa1025 on my board. attached is the diagram of the board (already working but with keil 4 software without hal library).
the problem is that the programmer retired and I had to take on the job of converting the software because of a touchpanel on the “stone” which is using the HAL library,
the old code uses the command “I2C_SendData(I2C1,AddressMEM>>8);” and the new i2c library doesn't have it and I'm a bit confused about the system that has been set up.
The AddressMEM variable is working perfectly as far as the address of the bytes to be read is concerned, the problem is passing this command to the
HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout),
where it has 7 parameters, or the command to read the bytes as well.
Attached are the keil 4 i2c.c and i2c.h files.
Could someone help me?
