sources/common/libs/STM32Cube_F4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src/usbd_ccid_cmd.c
/**
  * @brief  PC_to_RDR_IccPowerOff
  *         Icc VCC is switched Off
  * @param  pdev: device instance
  * @retval error: status of the command execution
  */
@brief  PC_to_RDR_IccPowerOff
Icc VCC is switched Off
@param  pdev: device instance
@retval error: status of the command execution
@brief PC_to_RDR_IccPowerOff Icc VCC is switched Off @param pdev : device instance @retval error : status of the command execution
uint8_t PC_to_RDR_IccPowerOff(USBD_HandleTypeDef *pdev)
{
  uint8_t error;
  error = CCID_CheckCommandParams(pdev, CHK_PARAM_SLOT | CHK_PARAM_ABRFU3 |
                                  CHK_PARAM_DWLENGTH);
  if (error != 0U)
  {
    return error;
  }
  if (SC_Detect() != 0U)
  {
    CCID_UpdateCommandStatus(pdev, (BM_COMMAND_STATUS_NO_ERROR), (BM_ICC_PRESENT_INACTIVE));
  }
  else
  {
    CCID_UpdateCommandStatus(pdev, (BM_COMMAND_STATUS_NO_ERROR), (BM_ICC_NO_ICC_PRESENT));
  }
  SC_Itf_IccPowerOff();
  return SLOT_NO_ERROR;
}
uint8_t PC_to_RDR_IccPowerOff ( USBD_HandleTypeDef * pdev ) { uint8_t error ; error = CCID_CheckCommandParams ( pdev , CHK_PARAM_SLOT | CHK_PARAM_ABRFU3 | CHK_PARAM_DWLENGTH ) ; if ( error != 0U ) { return error ; } if ( SC_Detect ( ) != 0U ) { CCID_UpdateCommandStatus ( pdev , ( BM_COMMAND_STATUS_NO_ERROR ) , ( BM_ICC_PRESENT_INACTIVE ) ) ; } else { CCID_UpdateCommandStatus ( pdev , ( BM_COMMAND_STATUS_NO_ERROR ) , ( BM_ICC_NO_ICC_PRESENT ) ) ; } SC_Itf_IccPowerOff ( ) ; return SLOT_NO_ERROR ; }
@brief  PC_to_RDR_IccPowerOff
         Icc VCC is switched Off
 @param  pdev: device instance
 @retval error: status of the command execution
@brief PC_to_RDR_IccPowerOff Icc VCC is switched Off @param pdev : device instance @retval error : status of the command execution
/*  The response to this command is the RDR_to_PC_SlotStatus*/ /* Command is ok, Check for Card Presence */ /* Power OFF the card */