AnsweredAssumed Answered

HAL_I2C_Master_Transmit OR HAL_I2C_Mem_Write

Question asked by Edwin Schmid on Nov 20, 2017
Dear all we have stm32f373xx chip.
MAX7313 Chip for LEDs. The connection is via I2C interface.
We need to ON an LED or group of them depending on some Interrupt.
We need to read the value about the LED status stored in the register.
What is the best function to use for this purpose?
HAL_I2C_Master_Receive/HAL_I2C_Master_Transmit
OR HAL_I2C_Mem_Read/HAL_I2C_Mem_Write
Below is the code we are using at the moment. To write to the Max7313 chip#
HAL_I2C_Master_Transmit(&hi2c1, MAX_UI2_ADDRESS,MAXwrite,3, 100);
If possible provide an example code.
Thanks in advance.

Outcomes