sources/common/libs/STM32Cube_F4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src/usbd_ccid_cmd.c
/**
  * @brief  RDR_to_PC_Escape
  *         Provide the Escaped data block response to the host
  *         Response for PC_to_RDR_Escape
  * @param  errorCode: code to be returned to the host
  * @param  pdev: device instance
  * @retval None
  */
@brief  RDR_to_PC_Escape
Provide the Escaped data block response to the host
Response for PC_to_RDR_Escape
@param  errorCode: code to be returned to the host
@param  pdev: device instance
@retval None
@brief RDR_to_PC_Escape Provide the Escaped data block response to the host Response for PC_to_RDR_Escape @param errorCode : code to be returned to the host @param pdev : device instance @retval None
void RDR_to_PC_Escape(uint8_t  errorCode, USBD_HandleTypeDef *pdev)
{
  USBD_CCID_HandleTypeDef  *hccid = (USBD_CCID_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
  uint32_t length = CCID_RESPONSE_HEADER_SIZE;
  hccid->UsbBlkInData.bMessageType = RDR_TO_PC_ESCAPE;
  hccid->UsbBlkInData.bSpecific = 0U;  
  hccid->UsbBlkInData.bError = errorCode;
  if (errorCode == SLOT_NO_ERROR)
  {
    length += hccid->UsbBlkInData.dwLength;   
  }
  (void)USBD_CCID_Transfer_Data_Request(pdev, (uint8_t *)(&hccid->UsbBlkInData), (uint16_t)length);
}
void RDR_to_PC_Escape ( uint8_t errorCode , USBD_HandleTypeDef * pdev ) { USBD_CCID_HandleTypeDef * hccid = ( USBD_CCID_HandleTypeDef * ) pdev -> pClassDataCmsit [ pdev -> classId ] ; uint32_t length = CCID_RESPONSE_HEADER_SIZE ; hccid -> UsbBlkInData . bMessageType = RDR_TO_PC_ESCAPE ; hccid -> UsbBlkInData . bSpecific = 0U ; hccid -> UsbBlkInData . bError = errorCode ; if ( errorCode == SLOT_NO_ERROR ) { length += hccid -> UsbBlkInData . dwLength ; } ( void ) USBD_CCID_Transfer_Data_Request ( pdev , ( uint8_t * ) ( & hccid -> UsbBlkInData ) , ( uint16_t ) length ) ; }
@brief  RDR_to_PC_Escape
         Provide the Escaped data block response to the host
         Response for PC_to_RDR_Escape
 @param  errorCode: code to be returned to the host
 @param  pdev: device instance
 @retval None
@brief RDR_to_PC_Escape Provide the Escaped data block response to the host Response for PC_to_RDR_Escape @param errorCode : code to be returned to the host @param pdev : device instance @retval None
/* Reserved for Future Use */ /* Length Specified in Command */