Lines Matching refs:hotfdec

174 HAL_StatusTypeDef HAL_OTFDEC_Init(OTFDEC_HandleTypeDef *hotfdec)  in HAL_OTFDEC_Init()  argument
177 if (hotfdec == NULL) in HAL_OTFDEC_Init()
183 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_Init()
185 if (hotfdec->State == HAL_OTFDEC_STATE_RESET) in HAL_OTFDEC_Init()
188 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_Init()
192 hotfdec->ErrorCallback = HAL_OTFDEC_ErrorCallback; /* Legacy weak callback */ in HAL_OTFDEC_Init()
194 if (hotfdec->MspInitCallback == NULL) in HAL_OTFDEC_Init()
196 hotfdec->MspInitCallback = HAL_OTFDEC_MspInit; /* Legacy weak MspInit */ in HAL_OTFDEC_Init()
200 hotfdec->MspInitCallback(hotfdec); in HAL_OTFDEC_Init()
203 HAL_OTFDEC_MspInit(hotfdec); in HAL_OTFDEC_Init()
208 hotfdec->State = HAL_OTFDEC_STATE_READY; in HAL_OTFDEC_Init()
220 HAL_StatusTypeDef HAL_OTFDEC_DeInit(OTFDEC_HandleTypeDef *hotfdec) in HAL_OTFDEC_DeInit() argument
223 if (hotfdec == NULL) in HAL_OTFDEC_DeInit()
229 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_DeInit()
232 hotfdec->State = HAL_OTFDEC_STATE_BUSY; in HAL_OTFDEC_DeInit()
235 if (hotfdec->MspDeInitCallback == NULL) in HAL_OTFDEC_DeInit()
237 hotfdec->MspDeInitCallback = HAL_OTFDEC_MspDeInit; /* Legacy weak MspDeInit */ in HAL_OTFDEC_DeInit()
241 hotfdec->MspDeInitCallback(hotfdec); in HAL_OTFDEC_DeInit()
244 HAL_OTFDEC_MspDeInit(hotfdec); in HAL_OTFDEC_DeInit()
248 hotfdec->State = HAL_OTFDEC_STATE_RESET; in HAL_OTFDEC_DeInit()
251 hotfdec->ErrorCode = HAL_OTFDEC_ERROR_NONE; in HAL_OTFDEC_DeInit()
254 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_DeInit()
266 __weak void HAL_OTFDEC_MspInit(OTFDEC_HandleTypeDef *hotfdec) in HAL_OTFDEC_MspInit() argument
269 UNUSED(hotfdec); in HAL_OTFDEC_MspInit()
282 __weak void HAL_OTFDEC_MspDeInit(OTFDEC_HandleTypeDef *hotfdec) in HAL_OTFDEC_MspDeInit() argument
285 UNUSED(hotfdec); in HAL_OTFDEC_MspDeInit()
306 HAL_StatusTypeDef HAL_OTFDEC_RegisterCallback(OTFDEC_HandleTypeDef *hotfdec, HAL_OTFDEC_CallbackIDT… in HAL_OTFDEC_RegisterCallback() argument
314 hotfdec->ErrorCode |= HAL_OTFDEC_ERROR_INVALID_CALLBACK; in HAL_OTFDEC_RegisterCallback()
319 if (hotfdec->State == HAL_OTFDEC_STATE_READY) in HAL_OTFDEC_RegisterCallback()
324 hotfdec->ErrorCallback = pCallback; in HAL_OTFDEC_RegisterCallback()
328 hotfdec->MspInitCallback = pCallback; in HAL_OTFDEC_RegisterCallback()
332 hotfdec->MspDeInitCallback = pCallback; in HAL_OTFDEC_RegisterCallback()
337 hotfdec->ErrorCode |= HAL_OTFDEC_ERROR_INVALID_CALLBACK; in HAL_OTFDEC_RegisterCallback()
344 else if (HAL_OTFDEC_STATE_RESET == hotfdec->State) in HAL_OTFDEC_RegisterCallback()
349 hotfdec->MspInitCallback = pCallback; in HAL_OTFDEC_RegisterCallback()
353 hotfdec->MspDeInitCallback = pCallback; in HAL_OTFDEC_RegisterCallback()
358 hotfdec->ErrorCode |= HAL_OTFDEC_ERROR_INVALID_CALLBACK; in HAL_OTFDEC_RegisterCallback()
368 hotfdec->ErrorCode |= HAL_OTFDEC_ERROR_INVALID_CALLBACK; in HAL_OTFDEC_RegisterCallback()
389 HAL_StatusTypeDef HAL_OTFDEC_UnRegisterCallback(OTFDEC_HandleTypeDef *hotfdec, HAL_OTFDEC_CallbackI… in HAL_OTFDEC_UnRegisterCallback() argument
393 if (hotfdec->State == HAL_OTFDEC_STATE_READY) in HAL_OTFDEC_UnRegisterCallback()
398 hotfdec->ErrorCallback = HAL_OTFDEC_ErrorCallback; in HAL_OTFDEC_UnRegisterCallback()
402 hotfdec->MspInitCallback = HAL_OTFDEC_MspInit; /* Legacy weak MspInit */ in HAL_OTFDEC_UnRegisterCallback()
406 hotfdec->MspDeInitCallback = HAL_OTFDEC_MspDeInit; /* Legacy weak MspDeInit */ in HAL_OTFDEC_UnRegisterCallback()
411 hotfdec->ErrorCode |= HAL_OTFDEC_ERROR_INVALID_CALLBACK; in HAL_OTFDEC_UnRegisterCallback()
418 else if (HAL_OTFDEC_STATE_RESET == hotfdec->State) in HAL_OTFDEC_UnRegisterCallback()
423 hotfdec->MspInitCallback = HAL_OTFDEC_MspInit; /* Legacy weak MspInit */ in HAL_OTFDEC_UnRegisterCallback()
427 hotfdec->MspDeInitCallback = HAL_OTFDEC_MspDeInit; /* Legacy weak MspDeInit */ in HAL_OTFDEC_UnRegisterCallback()
432 hotfdec->ErrorCode |= HAL_OTFDEC_ERROR_INVALID_CALLBACK; in HAL_OTFDEC_UnRegisterCallback()
442 hotfdec->ErrorCode |= HAL_OTFDEC_ERROR_INVALID_CALLBACK; in HAL_OTFDEC_UnRegisterCallback()
476 void HAL_OTFDEC_IRQHandler(OTFDEC_HandleTypeDef *hotfdec) in HAL_OTFDEC_IRQHandler() argument
480 isr_reg = READ_REG(hotfdec->Instance->ISR); in HAL_OTFDEC_IRQHandler()
483 SET_BIT(hotfdec->Instance->ICR, OTFDEC_ICR_SEIF); in HAL_OTFDEC_IRQHandler()
484 hotfdec->ErrorCode |= HAL_OTFDEC_SECURITY_ERROR; in HAL_OTFDEC_IRQHandler()
488 SET_BIT(hotfdec->Instance->ICR, OTFDEC_ICR_XONEIF); in HAL_OTFDEC_IRQHandler()
489 hotfdec->ErrorCode |= HAL_OTFDEC_EXECUTE_ERROR; in HAL_OTFDEC_IRQHandler()
493 SET_BIT(hotfdec->Instance->ICR, OTFDEC_ICR_KEIF); in HAL_OTFDEC_IRQHandler()
494 hotfdec->ErrorCode |= HAL_OTFDEC_KEY_ERROR; in HAL_OTFDEC_IRQHandler()
498 hotfdec->ErrorCallback(hotfdec); in HAL_OTFDEC_IRQHandler()
500 HAL_OTFDEC_ErrorCallback(hotfdec); in HAL_OTFDEC_IRQHandler()
510 __weak void HAL_OTFDEC_ErrorCallback(OTFDEC_HandleTypeDef *hotfdec) in HAL_OTFDEC_ErrorCallback() argument
513 UNUSED(hotfdec); in HAL_OTFDEC_ErrorCallback()
549 HAL_StatusTypeDef HAL_OTFDEC_RegionKeyLock(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex) in HAL_OTFDEC_RegionKeyLock() argument
555 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_RegionKeyLock()
559 __HAL_LOCK(hotfdec); in HAL_OTFDEC_RegionKeyLock()
561 address = (uint32_t)(hotfdec->Instance) + 0x20U + (0x30U * RegionIndex); in HAL_OTFDEC_RegionKeyLock()
567 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionKeyLock()
583 HAL_StatusTypeDef HAL_OTFDEC_RegionSetKey(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex, uint… in HAL_OTFDEC_RegionSetKey() argument
589 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_RegionSetKey()
599 __HAL_LOCK(hotfdec); in HAL_OTFDEC_RegionSetKey()
601 address = (uint32_t)(hotfdec->Instance) + 0x20U + (0x30U * RegionIndex); in HAL_OTFDEC_RegionSetKey()
623 if (HAL_OTFDEC_KeyCRCComputation(pKey) != HAL_OTFDEC_RegionGetKeyCRC(hotfdec, RegionIndex)) in HAL_OTFDEC_RegionSetKey()
626 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionSetKey()
633 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionSetKey()
656 HAL_StatusTypeDef HAL_OTFDEC_RegionSetMode(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex, uin… in HAL_OTFDEC_RegionSetMode() argument
662 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_RegionSetMode()
667 __HAL_LOCK(hotfdec); in HAL_OTFDEC_RegionSetMode()
669 address = (uint32_t)(hotfdec->Instance) + 0x20U + (0x30U * RegionIndex); in HAL_OTFDEC_RegionSetMode()
676 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionSetMode()
695 HAL_StatusTypeDef HAL_OTFDEC_RegionConfig(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex, in HAL_OTFDEC_RegionConfig() argument
702 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_RegionConfig()
714 __HAL_LOCK(hotfdec); in HAL_OTFDEC_RegionConfig()
716 address = (uint32_t)(hotfdec->Instance) + 0x20U + (0x30U * RegionIndex); in HAL_OTFDEC_RegionConfig()
743 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionConfig()
806 HAL_StatusTypeDef HAL_OTFDEC_RegionEnable(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex) in HAL_OTFDEC_RegionEnable() argument
812 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_RegionEnable()
816 __HAL_LOCK(hotfdec); in HAL_OTFDEC_RegionEnable()
818 address = (uint32_t)(hotfdec->Instance) + 0x20U + (0x30U * RegionIndex); in HAL_OTFDEC_RegionEnable()
824 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionEnable()
833 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionEnable()
847 HAL_StatusTypeDef HAL_OTFDEC_RegionDisable(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex) in HAL_OTFDEC_RegionDisable() argument
853 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_RegionDisable()
857 __HAL_LOCK(hotfdec); in HAL_OTFDEC_RegionDisable()
859 address = (uint32_t)(hotfdec->Instance) + 0x20U + (0x30U * RegionIndex); in HAL_OTFDEC_RegionDisable()
865 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionDisable()
874 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionDisable()
904 HAL_OTFDEC_StateTypeDef HAL_OTFDEC_GetState(const OTFDEC_HandleTypeDef *hotfdec) in HAL_OTFDEC_GetState() argument
906 return hotfdec->State; in HAL_OTFDEC_GetState()
917 uint32_t HAL_OTFDEC_RegionGetKeyCRC(const OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex) in HAL_OTFDEC_RegionGetKeyCRC() argument
924 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_RegionGetKeyCRC()
927 address = (uint32_t)(hotfdec->Instance) + 0x20U + (0x30U * RegionIndex); in HAL_OTFDEC_RegionGetKeyCRC()
945 HAL_StatusTypeDef HAL_OTFDEC_RegionGetConfig(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex, in HAL_OTFDEC_RegionGetConfig() argument
952 assert_param(IS_OTFDEC_ALL_INSTANCE(hotfdec->Instance)); in HAL_OTFDEC_RegionGetConfig()
962 __HAL_LOCK(hotfdec); in HAL_OTFDEC_RegionGetConfig()
964 address = (uint32_t)(hotfdec->Instance) + 0x20U + (0x30U * RegionIndex); in HAL_OTFDEC_RegionGetConfig()
980 __HAL_UNLOCK(hotfdec); in HAL_OTFDEC_RegionGetConfig()