I have started learning STM32 programming in HAL and I am confused about what this function exactly does:
__weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
/* Prevent unused argument(s) compilation warning */
UNUSED(GPIO_Pin);
/* NOTE: This function should not be modified, when the
callback is needed, the HAL_GPIO_EXTI_Callback could be
implemented in the user file
*/
}
What is the significance of the keyword (I am not sure if it's actually a keyword) __weak
here and where do you use it? I saw a video where the lecturer said something about it but I did not understand.