cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_I2C_MasterTxCpltCallback for second i2c

alsaleem
Associate II
Posted on June 18, 2016 at 00:00

I am using both I2Cs in my board. Also, using DMA for non-blocking.

HAL_I2C_Master_Transmit_DMA generates interrupt for completion (also for reception and error.

HAL only allows for one ''weak'' callback for both.

Is there away to name my callback functions (complete/error ...) for each I2C in order to separate logic for each I2C? 

Thanks.

#stm32f4xx-i2c-hal_callbacks
1 REPLY 1
Amel NASRI
ST Employee
Posted on June 28, 2016 at 15:24

Hi alsaleem.ahmad,

You may add a check on I2C instance in the CallBack function then implement what you need depending on the instance.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.