Showing results for 
Search instead for 
Did you mean: 

HAL Functions

Associate III

Diference between the below 2 funtions:
HAL_StatusTypeDef HAL_I2C_Master_Transmit(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t* pData,uint16_t Size, uint32_t Timeout);
HAL_StatusTypeDef HAL_I2C_Master_Seq_Transmit_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t* pData,uint16_t Size, uint32_t XferOptions);

When should I use the below functions?
HAL_StatusTypeDef HAL_I2C_EnableListen(I2C_HandleTypeDef *hi2c);
HAL_StatusTypeDef HAL_I2C_DisableListen(I2C_HandleTypeDef *hi2c);
HAL_StatusTypeDef HAL_I2C_Master_Abort(I2C_HandleTypeDef *hi2c, uint16_t DevAddress);
void HAL_I2C_EV_IRQHandler(I2C_HandleTypeDef *hi2c);
void HAL_I2C_ER_IRQHandler(I2C_HandleTypeDef *hi2c);

there are many library functions as such, but we don't get to use all of them but where should we search to find the exact use of the the HAL functions and how to find the correct application for it?


Chief II

A basic description is in the HAL libs as comment , just see, whats in ../drivers/...HAL../src/..hal_i2c.c :

at first lines : general description


and in every function ..:



>and how to find the correct application for it?

Well, at first, you should know, what you want to do - the HAL is just a library, to get a certain function to work, not a teacher, to tell you, what to do now. 🙂

Examples, how to use this or that, you can find in git - just search, for what you looking for, ->

and see also the app notes etc. on STM , for a cpu you use ->


or more general:




If you feel a post has answered your question, please click "Accept as Solution".

Thanks for your time and effort. Sure, I'll look forward to it.!