示例#1
0
/**
 * @brief  DeInitializes the FSMC_PCCARD device 
 * @param  Device: Pointer to PCCARD device instance
 * @retval HAL status
 */
HAL_StatusTypeDef FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device) {
	/* Disable the FSMC_PCCARD device */
	__FSMC_PCCARD_DISABLE(Device);

	/* De-initialize the FSMC_PCCARD device */
	Device->PCR4 = 0x00000018U;
	Device->SR4 = 0x00000000U;
	Device->PMEM4 = 0xFCFCFCFCU;
	Device->PATT4 = 0xFCFCFCFCU;
	Device->PIO4 = 0xFCFCFCFCU;

	return HAL_OK;
}
/**
  * @brief  DeInitializes the FSMC_PCCARD device 
  * @param  Device: Pointer to PCCARD device instance
  * @retval HAL status
  */
HAL_StatusTypeDef FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device)
{
  /* Check the parameters */  
  assert_param(IS_FSMC_PCCARD_DEVICE(Device));
    
  /* Disable the FSMC_PCCARD device */
  __FSMC_PCCARD_DISABLE(Device);
  
  /* De-initialize the FSMC_PCCARD device */
  WRITE_REG(Device->PCR4,  0x00000018);
  WRITE_REG(Device->SR4,   0x00000040);
  WRITE_REG(Device->PMEM4, 0xFCFCFCFC);
  WRITE_REG(Device->PATT4, 0xFCFCFCFC);
  WRITE_REG(Device->PIO4,  0xFCFCFCFC);
  
  return HAL_OK;
}