Lines Matching refs:hpccard

165 HAL_StatusTypeDef HAL_PCCARD_Init(PCCARD_HandleTypeDef *hpccard, FMC_NAND_PCC_TimingTypeDef *ComSpa…  in HAL_PCCARD_Init()  argument
169 if (hpccard == NULL) in HAL_PCCARD_Init()
174 if (hpccard->State == HAL_PCCARD_STATE_RESET) in HAL_PCCARD_Init()
177 hpccard->Lock = HAL_UNLOCKED; in HAL_PCCARD_Init()
179 if (hpccard->MspInitCallback == NULL) in HAL_PCCARD_Init()
181 hpccard->MspInitCallback = HAL_PCCARD_MspInit; in HAL_PCCARD_Init()
183 hpccard->ItCallback = HAL_PCCARD_ITCallback; in HAL_PCCARD_Init()
186 hpccard->MspInitCallback(hpccard); in HAL_PCCARD_Init()
189 HAL_PCCARD_MspInit(hpccard); in HAL_PCCARD_Init()
194 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Init()
197 FMC_PCCARD_Init(hpccard->Instance, &(hpccard->Init)); in HAL_PCCARD_Init()
200 FMC_PCCARD_CommonSpace_Timing_Init(hpccard->Instance, ComSpaceTiming); in HAL_PCCARD_Init()
203 FMC_PCCARD_AttributeSpace_Timing_Init(hpccard->Instance, AttSpaceTiming); in HAL_PCCARD_Init()
206 FMC_PCCARD_IOSpace_Timing_Init(hpccard->Instance, IOSpaceTiming); in HAL_PCCARD_Init()
209 __FMC_PCCARD_ENABLE(hpccard->Instance); in HAL_PCCARD_Init()
212 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Init()
224 HAL_StatusTypeDef HAL_PCCARD_DeInit(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_DeInit() argument
227 if (hpccard->MspDeInitCallback == NULL) in HAL_PCCARD_DeInit()
229 hpccard->MspDeInitCallback = HAL_PCCARD_MspDeInit; in HAL_PCCARD_DeInit()
233 hpccard->MspDeInitCallback(hpccard); in HAL_PCCARD_DeInit()
236 HAL_PCCARD_MspDeInit(hpccard); in HAL_PCCARD_DeInit()
240 FMC_PCCARD_DeInit(hpccard->Instance); in HAL_PCCARD_DeInit()
243 hpccard->State = HAL_PCCARD_STATE_RESET; in HAL_PCCARD_DeInit()
246 __HAL_UNLOCK(hpccard); in HAL_PCCARD_DeInit()
257 __weak void HAL_PCCARD_MspInit(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_MspInit() argument
260 UNUSED(hpccard); in HAL_PCCARD_MspInit()
272 __weak void HAL_PCCARD_MspDeInit(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_MspDeInit() argument
275 UNUSED(hpccard); in HAL_PCCARD_MspDeInit()
308 HAL_StatusTypeDef HAL_PCCARD_Read_ID(PCCARD_HandleTypeDef *hpccard, uint8_t CompactFlash_ID[], uint… in HAL_PCCARD_Read_ID() argument
314 __HAL_LOCK(hpccard); in HAL_PCCARD_Read_ID()
317 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Read_ID()
323 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Read_ID()
354 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Read_ID()
357 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Read_ID()
371 HAL_StatusTypeDef HAL_PCCARD_Read_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_t… in HAL_PCCARD_Read_Sector() argument
378 __HAL_LOCK(hpccard); in HAL_PCCARD_Read_Sector()
381 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Read_Sector()
387 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Read_Sector()
430 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Read_Sector()
433 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Read_Sector()
448 HAL_StatusTypeDef HAL_PCCARD_Write_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t *pBuffer, uint16_… in HAL_PCCARD_Write_Sector() argument
455 __HAL_LOCK(hpccard); in HAL_PCCARD_Write_Sector()
458 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Write_Sector()
464 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Write_Sector()
505 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Write_Sector()
508 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Write_Sector()
522 HAL_StatusTypeDef HAL_PCCARD_Erase_Sector(PCCARD_HandleTypeDef *hpccard, uint16_t SectorAddress, u… in HAL_PCCARD_Erase_Sector() argument
528 __HAL_LOCK(hpccard); in HAL_PCCARD_Erase_Sector()
531 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Erase_Sector()
537 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Erase_Sector()
565 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Erase_Sector()
568 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Erase_Sector()
579 HAL_StatusTypeDef HAL_PCCARD_Reset(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_Reset() argument
582 __HAL_LOCK(hpccard); in HAL_PCCARD_Reset()
585 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_Reset()
598 hpccard->State = HAL_PCCARD_STATE_BUSY; in HAL_PCCARD_Reset()
603 hpccard->State = HAL_PCCARD_STATE_READY; in HAL_PCCARD_Reset()
606 __HAL_UNLOCK(hpccard); in HAL_PCCARD_Reset()
617 void HAL_PCCARD_IRQHandler(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_IRQHandler() argument
620 if (__FMC_PCCARD_GET_FLAG(hpccard->Instance, FMC_FLAG_RISING_EDGE)) in HAL_PCCARD_IRQHandler()
624 hpccard->ItCallback(hpccard); in HAL_PCCARD_IRQHandler()
626 HAL_PCCARD_ITCallback(hpccard); in HAL_PCCARD_IRQHandler()
630 __FMC_PCCARD_CLEAR_FLAG(hpccard->Instance, FMC_FLAG_RISING_EDGE); in HAL_PCCARD_IRQHandler()
634 if (__FMC_PCCARD_GET_FLAG(hpccard->Instance, FMC_FLAG_LEVEL)) in HAL_PCCARD_IRQHandler()
638 hpccard->ItCallback(hpccard); in HAL_PCCARD_IRQHandler()
640 HAL_PCCARD_ITCallback(hpccard); in HAL_PCCARD_IRQHandler()
644 __FMC_PCCARD_CLEAR_FLAG(hpccard->Instance, FMC_FLAG_LEVEL); in HAL_PCCARD_IRQHandler()
648 if (__FMC_PCCARD_GET_FLAG(hpccard->Instance, FMC_FLAG_FALLING_EDGE)) in HAL_PCCARD_IRQHandler()
652 hpccard->ItCallback(hpccard); in HAL_PCCARD_IRQHandler()
654 HAL_PCCARD_ITCallback(hpccard); in HAL_PCCARD_IRQHandler()
658 __FMC_PCCARD_CLEAR_FLAG(hpccard->Instance, FMC_FLAG_FALLING_EDGE); in HAL_PCCARD_IRQHandler()
662 if (__FMC_PCCARD_GET_FLAG(hpccard->Instance, FMC_FLAG_FEMPT)) in HAL_PCCARD_IRQHandler()
666 hpccard->ItCallback(hpccard); in HAL_PCCARD_IRQHandler()
668 HAL_PCCARD_ITCallback(hpccard); in HAL_PCCARD_IRQHandler()
672 __FMC_PCCARD_CLEAR_FLAG(hpccard->Instance, FMC_FLAG_FEMPT); in HAL_PCCARD_IRQHandler()
682 __weak void HAL_PCCARD_ITCallback(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_ITCallback() argument
685 UNUSED(hpccard); in HAL_PCCARD_ITCallback()
704 HAL_StatusTypeDef HAL_PCCARD_RegisterCallback(PCCARD_HandleTypeDef *hpccard, HAL_PCCARD_CallbackIDT… in HAL_PCCARD_RegisterCallback() argument
715 __HAL_LOCK(hpccard); in HAL_PCCARD_RegisterCallback()
717 if (hpccard->State == HAL_PCCARD_STATE_READY) in HAL_PCCARD_RegisterCallback()
722 hpccard->MspInitCallback = pCallback; in HAL_PCCARD_RegisterCallback()
725 hpccard->MspDeInitCallback = pCallback; in HAL_PCCARD_RegisterCallback()
728 hpccard->ItCallback = pCallback; in HAL_PCCARD_RegisterCallback()
736 else if (hpccard->State == HAL_PCCARD_STATE_RESET) in HAL_PCCARD_RegisterCallback()
741 hpccard->MspInitCallback = pCallback; in HAL_PCCARD_RegisterCallback()
744 hpccard->MspDeInitCallback = pCallback; in HAL_PCCARD_RegisterCallback()
759 __HAL_UNLOCK(hpccard); in HAL_PCCARD_RegisterCallback()
774 HAL_StatusTypeDef HAL_PCCARD_UnRegisterCallback(PCCARD_HandleTypeDef *hpccard, HAL_PCCARD_CallbackI… in HAL_PCCARD_UnRegisterCallback() argument
779 __HAL_LOCK(hpccard); in HAL_PCCARD_UnRegisterCallback()
781 if (hpccard->State == HAL_PCCARD_STATE_READY) in HAL_PCCARD_UnRegisterCallback()
786 hpccard->MspInitCallback = HAL_PCCARD_MspInit; in HAL_PCCARD_UnRegisterCallback()
789 hpccard->MspDeInitCallback = HAL_PCCARD_MspDeInit; in HAL_PCCARD_UnRegisterCallback()
792 hpccard->ItCallback = HAL_PCCARD_ITCallback; in HAL_PCCARD_UnRegisterCallback()
800 else if (hpccard->State == HAL_PCCARD_STATE_RESET) in HAL_PCCARD_UnRegisterCallback()
805 hpccard->MspInitCallback = HAL_PCCARD_MspInit; in HAL_PCCARD_UnRegisterCallback()
808 hpccard->MspDeInitCallback = HAL_PCCARD_MspDeInit; in HAL_PCCARD_UnRegisterCallback()
823 __HAL_UNLOCK(hpccard); in HAL_PCCARD_UnRegisterCallback()
853 HAL_PCCARD_StateTypeDef HAL_PCCARD_GetState(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_GetState() argument
855 return hpccard->State; in HAL_PCCARD_GetState()
867 HAL_PCCARD_StatusTypeDef HAL_PCCARD_GetStatus(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_GetStatus() argument
872 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_GetStatus()
903 HAL_PCCARD_StatusTypeDef HAL_PCCARD_ReadStatus(PCCARD_HandleTypeDef *hpccard) in HAL_PCCARD_ReadStatus() argument
908 if (hpccard->State == HAL_PCCARD_STATE_BUSY) in HAL_PCCARD_ReadStatus()