AN1527 STMICROELECTRONICS [STMicroelectronics], AN1527 Datasheet - Page 3

no-image

AN1527

Manufacturer Part Number
AN1527
Description
DEVELOPING A USB SMARTCARD READER WITH ST7SCR
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
To finish the main loop, the CCID_BulkInMessage() function sends the Bulk-in message as an
answer to the previous Bulk-out message. The message is sent in a process that requires sev-
eral Bulk-in transactions (same concept as for the Bulk-out process).
In addition, the Abort request is implemented through the CCIDClassRequestAbort() function
called in the USB_Polling() function. For this purpose, the USB_Polling() function is called in
the PC_to_RDR_xxx() function. When this request is received from endpoint 0, a flag is set
and the command sequence number is memorized.
All commands are aborted until the next PC_to_RDR_Abort command with the correct se-
quence number is received.
1.2 FUNCTION DESCRIPTION
This function initializes the flags and status variables for the state machine process.
This function initializes the state machine and switches off the VccCard after a USB reset
done by the PC Host. It can only be called by an interrupt routine.
This function initializes the state machine and the card interface hardware after a resume from
USB suspend mode.
This function manages the state machine during USB Bulk Out message reception. It fills the
message buffer with a maximum of 271 bytes.
This function manages the state machine during the USB Bulk In message transmission. It
sends the buffer content as a message with a maximum of 271 bytes.
This function identifies the USB Bulk Out received message and calls the corresponding func-
tions to process it : PC_to_RDR_xxx() and RDR_to_PC_xxx().
This function verifies the slot status and sends an interrupt In message if needed.
void CCID_Init(void)
void CCID_Init_IT(void)
void CCID_Suspend_IT(void)
void CCID_BulkOutMessage(void)
void CCID_BulkInMessage(void)
void CCID_DispatchMessage(void)
void CCID_IntMessage(void)
DEVELOPING A USB SMARTCARD READER WITH ST7SCR
3/14

Related parts for AN1527