/** * @brief Starts the WWDG with interrupt enabled. * @param hwwdg: pointer to a WWDG_HandleTypeDef structure that contains * the configuration information for the specified WWDG module. * @retval HAL status */ HAL_StatusTypeDef HAL_WWDG_Start_IT(WWDG_HandleTypeDef *hwwdg) { /* Process Locked */ __HAL_LOCK(hwwdg); /* Change WWDG peripheral state */ hwwdg->State = HAL_WWDG_STATE_BUSY; /* Enable the Early Wakeup Interrupt */ __HAL_WWDG_ENABLE_IT(WWDG_IT_EWI); /* Enable the peripheral */ __HAL_WWDG_ENABLE(hwwdg); /* Return function status */ return HAL_OK; }
/** * @brief Starts the WWDG with interrupt enabled. * @param hwwdg : pointer to a WWDG_HandleTypeDef structure that contains * the configuration information for the specified WWDG module. * @retval HAL status */ HAL_StatusTypeDef HAL_WWDG_Start_IT(WWDG_HandleTypeDef *hwwdg) { /* Take lock and change peripheral state */ __HAL_LOCK(hwwdg); hwwdg->State = HAL_WWDG_STATE_BUSY; /* Enable the Early Wakeup Interrupt */ __HAL_WWDG_ENABLE_IT(hwwdg,WWDG_IT_EWI); /* Enable the peripheral */ __HAL_WWDG_ENABLE(hwwdg); /* Change peripheral state and release lock*/ hwwdg->State = HAL_WWDG_STATE_READY; __HAL_UNLOCK(hwwdg); /* Return function status */ return HAL_OK; }