Lines Matching refs:hpccard

164 HAL_StatusTypeDef HAL_PCCARD_Init(PCCARD_HandleTypeDef *hpccard, FSMC_NAND_PCC_TimingTypeDef *ComSp…  in HAL_PCCARD_Init()  argument
168 if (hpccard == NULL) in HAL_PCCARD_Init()
173 if (hpccard->State == HAL_PCCARD_STATE_RESET) in HAL_PCCARD_Init()
176 hpccard->Lock = HAL_UNLOCKED; in HAL_PCCARD_Init()
178 if (hpccard->MspInitCallback == NULL) in HAL_PCCARD_Init()
180 hpccard->MspInitCallback = HAL_PCCARD_MspInit; in HAL_PCCARD_Init()
182 hpccard->ItCallback = HAL_PCCARD_ITCallback; in HAL_PCCARD_Init()
185 hpccard->MspInitCallback(hpccard); in HAL_PCCARD_Init()
188 HAL_PCCARD_MspInit(hpccard); in HAL_PCCARD_Init()
193 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Init()
196 FSMC_PCCARD_Init(hpccard->Instance, &(hpccard->Init)); in HAL_PCCARD_Init()
199 FSMC_PCCARD_CommonSpace_Timing_Init(hpccard->Instance, ComSpaceTiming); in HAL_PCCARD_Init()
202 FSMC_PCCARD_AttributeSpace_Timing_Init(hpccard->Instance, AttSpaceTiming); in HAL_PCCARD_Init()
205 FSMC_PCCARD_IOSpace_Timing_Init(hpccard->Instance, IOSpaceTiming); in HAL_PCCARD_Init()
208 __FSMC_PCCARD_ENABLE(hpccard->Instance); in HAL_PCCARD_Init()
211 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Init()
223 HAL_StatusTypeDef HAL_PCCARD_DeInit(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_DeInit() argument
226 if (hpccard->MspDeInitCallback == NULL) in HAL_PCCARD_DeInit()
228 hpccard->MspDeInitCallback = HAL_PCCARD_MspDeInit; in HAL_PCCARD_DeInit()
232 hpccard->MspDeInitCallback(hpccard); in HAL_PCCARD_DeInit()
235 HAL_PCCARD_MspDeInit(hpccard); in HAL_PCCARD_DeInit()
239 FSMC_PCCARD_DeInit(hpccard->Instance); in HAL_PCCARD_DeInit()
242 hpccard->State = HAL_PCCARD_STATE_RESET; in HAL_PCCARD_DeInit()
245 __HAL_UNLOCK(hpccard); in HAL_PCCARD_DeInit()
256 __weak void HAL_PCCARD_MspInit(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_MspInit() argument
259 UNUSED(hpccard); in HAL_PCCARD_MspInit()
271 __weak void HAL_PCCARD_MspDeInit(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_MspDeInit() argument
274 UNUSED(hpccard); in HAL_PCCARD_MspDeInit()
307 HAL_StatusTypeDef HAL_PCCARD_Read_ID(PCCARD_HandleTypeDef *hpccard, uint8_t CompactFlash_ID[], uint… in HAL_PCCARD_Read_ID() argument
313 __HAL_LOCK(hpccard); in HAL_PCCARD_Read_ID()
316 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Read_ID()
322 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Read_ID()
353 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Read_ID()
356 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Read_ID()
370 HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t… in HAL_PCCARD_Read_Sector() argument
377 __HAL_LOCK(hpccard); in HAL_PCCARD_Read_Sector()
380 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Read_Sector()
386 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Read_Sector()
429 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Read_Sector()
432 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Read_Sector()
447 HAL_StatusTypeDef HAL_PCCARD_Write_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_… in HAL_PCCARD_Write_Sector() argument
454 __HAL_LOCK(hpccard); in HAL_PCCARD_Write_Sector()
457 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Write_Sector()
463 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Write_Sector()
504 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Write_Sector()
507 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Write_Sector()
521 HAL_StatusTypeDef HAL_PCCARD_Erase_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t SectorAddress, u… in HAL_PCCARD_Erase_Sector() argument
527 __HAL_LOCK(hpccard); in HAL_PCCARD_Erase_Sector()
530 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Erase_Sector()
536 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Erase_Sector()
564 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Erase_Sector()
567 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Erase_Sector()
578 HAL_StatusTypeDef HAL_PCCARD_Reset(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_Reset() argument
581 __HAL_LOCK(hpccard); in HAL_PCCARD_Reset()
584 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Reset()
597 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Reset()
602 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Reset()
605 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Reset()
616 void HAL_PCCARD_IRQHandler(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_IRQHandler() argument
619 if (__FSMC_PCCARD_GET_FLAG(hpccard->Instance, FSMC_FLAG_RISING_EDGE)) in HAL_PCCARD_IRQHandler()
623 hpccard->ItCallback(hpccard); in HAL_PCCARD_IRQHandler()
625 HAL_PCCARD_ITCallback(hpccard); in HAL_PCCARD_IRQHandler()
629 __FSMC_PCCARD_CLEAR_FLAG(hpccard->Instance, FSMC_FLAG_RISING_EDGE); in HAL_PCCARD_IRQHandler()
633 if (__FSMC_PCCARD_GET_FLAG(hpccard->Instance, FSMC_FLAG_LEVEL)) in HAL_PCCARD_IRQHandler()
637 hpccard->ItCallback(hpccard); in HAL_PCCARD_IRQHandler()
639 HAL_PCCARD_ITCallback(hpccard); in HAL_PCCARD_IRQHandler()
643 __FSMC_PCCARD_CLEAR_FLAG(hpccard->Instance, FSMC_FLAG_LEVEL); in HAL_PCCARD_IRQHandler()
647 if (__FSMC_PCCARD_GET_FLAG(hpccard->Instance, FSMC_FLAG_FALLING_EDGE)) in HAL_PCCARD_IRQHandler()
651 hpccard->ItCallback(hpccard); in HAL_PCCARD_IRQHandler()
653 HAL_PCCARD_ITCallback(hpccard); in HAL_PCCARD_IRQHandler()
657 __FSMC_PCCARD_CLEAR_FLAG(hpccard->Instance, FSMC_FLAG_FALLING_EDGE); in HAL_PCCARD_IRQHandler()
661 if (__FSMC_PCCARD_GET_FLAG(hpccard->Instance, FSMC_FLAG_FEMPT)) in HAL_PCCARD_IRQHandler()
665 hpccard->ItCallback(hpccard); in HAL_PCCARD_IRQHandler()
667 HAL_PCCARD_ITCallback(hpccard); in HAL_PCCARD_IRQHandler()
671 __FSMC_PCCARD_CLEAR_FLAG(hpccard->Instance, FSMC_FLAG_FEMPT); in HAL_PCCARD_IRQHandler()
681 __weak void HAL_PCCARD_ITCallback(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_ITCallback() argument
684 UNUSED(hpccard); in HAL_PCCARD_ITCallback()
703 HAL_StatusTypeDef HAL_PCCARD_RegisterCallback(PCCARD_HandleTypeDef *hpccard, HAL_PCCARD_CallbackIDT… in HAL_PCCARD_RegisterCallback() argument
714 __HAL_LOCK(hpccard); in HAL_PCCARD_RegisterCallback()
716 if (hpccard->State == HAL_PCCARD_STATE_READY) in HAL_PCCARD_RegisterCallback()
721 hpccard->MspInitCallback = pCallback; in HAL_PCCARD_RegisterCallback()
724 hpccard->MspDeInitCallback = pCallback; in HAL_PCCARD_RegisterCallback()
727 hpccard->ItCallback = pCallback; in HAL_PCCARD_RegisterCallback()
735 else if (hpccard->State == HAL_PCCARD_STATE_RESET) in HAL_PCCARD_RegisterCallback()
740 hpccard->MspInitCallback = pCallback; in HAL_PCCARD_RegisterCallback()
743 hpccard->MspDeInitCallback = pCallback; in HAL_PCCARD_RegisterCallback()
758 __HAL_UNLOCK(hpccard); in HAL_PCCARD_RegisterCallback()
773 HAL_StatusTypeDef HAL_PCCARD_UnRegisterCallback(PCCARD_HandleTypeDef *hpccard, HAL_PCCARD_CallbackI… in HAL_PCCARD_UnRegisterCallback() argument
778 __HAL_LOCK(hpccard); in HAL_PCCARD_UnRegisterCallback()
780 if (hpccard->State == HAL_PCCARD_STATE_READY) in HAL_PCCARD_UnRegisterCallback()
785 hpccard->MspInitCallback = HAL_PCCARD_MspInit; in HAL_PCCARD_UnRegisterCallback()
788 hpccard->MspDeInitCallback = HAL_PCCARD_MspDeInit; in HAL_PCCARD_UnRegisterCallback()
791 hpccard->ItCallback = HAL_PCCARD_ITCallback; in HAL_PCCARD_UnRegisterCallback()
799 else if (hpccard->State == HAL_PCCARD_STATE_RESET) in HAL_PCCARD_UnRegisterCallback()
804 hpccard->MspInitCallback = HAL_PCCARD_MspInit; in HAL_PCCARD_UnRegisterCallback()
807 hpccard->MspDeInitCallback = HAL_PCCARD_MspDeInit; in HAL_PCCARD_UnRegisterCallback()
822 __HAL_UNLOCK(hpccard); in HAL_PCCARD_UnRegisterCallback()
852 HAL_PCCARD_StateTypeDef HAL_PCCARD_GetState(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_GetState() argument
854 return hpccard->State; in HAL_PCCARD_GetState()
866 HAL_PCCARD_StatusTypeDef HAL_PCCARD_GetStatus(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_GetStatus() argument
871 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_GetStatus()
902 HAL_PCCARD_StatusTypeDef HAL_PCCARD_ReadStatus(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_ReadStatus() argument
907 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_ReadStatus()