2024-04-26 11:39 PM
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?
2024-04-27 01:14 AM - edited 2024-04-27 01:15 AM
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, ->
https://github.com/STMicroelectronics
and see also the app notes etc. on STM , for a cpu you use ->
https://www.st.com/en/microcontrollers-microprocessors/stm32f407vg.html#documentation
or more general:
https://www.st.com/content/st_com/en/search.html#q=I2C%20HAL-t=resources-page=1
2024-04-27 03:35 AM
Thanks for your time and effort. Sure, I'll look forward to it.!