diff options
author | Filipe Rodrigues <filipepazrodrigues@gmail.com> | 2018-06-17 15:50:25 -0700 |
---|---|---|
committer | Filipe Rodrigues <filipepazrodrigues@gmail.com> | 2018-06-17 15:50:25 -0700 |
commit | be13902026cdfea208a3d3016657c259361a0aaf (patch) | |
tree | caee7cb56bdb7f46c785164827add734faf2cb55 /Demos/Device/ClassDriver/CCID/CCID.c | |
parent | fc371d0d0e3a60b06dec862e37612375860c41d5 (diff) | |
download | lufa-be13902026cdfea208a3d3016657c259361a0aaf.tar.gz lufa-be13902026cdfea208a3d3016657c259361a0aaf.tar.bz2 lufa-be13902026cdfea208a3d3016657c259361a0aaf.zip |
Review fixes
- Added documentation
- Removed incomplete XfrBlock message
- Renamed Attr to Atr
Diffstat (limited to 'Demos/Device/ClassDriver/CCID/CCID.c')
-rw-r--r-- | Demos/Device/ClassDriver/CCID/CCID.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/Demos/Device/ClassDriver/CCID/CCID.c b/Demos/Device/ClassDriver/CCID/CCID.c index 40491fcfd..8efe87d55 100644 --- a/Demos/Device/ClassDriver/CCID/CCID.c +++ b/Demos/Device/ClassDriver/CCID/CCID.c @@ -158,13 +158,13 @@ void EVENT_USB_Device_ControlRequest(void) * THe slot must reply back with a recognizable ATR (answer to reset) */ uint8_t CALLBACK_CCID_IccPowerOn(uint8_t slot, - uint8_t* attr, + uint8_t* atr, uint8_t* attrSize, uint8_t* error) { if (slot < CCID_Interface.Config.TotalSlots) { - Iso7816_CreateSimpleAtr(attr, attrSize); + Iso7816_CreateSimpleAtr(atr, attrSize); *error = CCID_ERROR_NO_ERROR; return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR | CCID_ICCSTATUS_PRESENTANDACTIVE; } @@ -208,34 +208,6 @@ uint8_t CALLBACK_CCID_GetSlotStatus(uint8_t slot, uint8_t* error) } } -/** Event handler for the CCID_PC_to_RDR_XfrBlock. THis message is sent to the device - * whenever an application at the host wants to send a block of bytes to the device - * THe device reply back with an array of bytes - */ -uint8_t CALLBACK_CCID_XfrBlock(uint8_t slot, - uint8_t* error, - uint8_t* receivedBuffer, - uint8_t receivedBufferSize, - uint8_t* sendBuffer, - uint8_t* sentBufferSize) -{ - if (slot < CCID_Interface.Config.TotalSlots) - { - uint8_t okResponse[2] = {0x90, 0x00}; - memcpy(sendBuffer, okResponse, sizeof(okResponse)); - *sentBufferSize = sizeof(okResponse); - - *error = CCID_ERROR_NO_ERROR; - return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR | CCID_ICCSTATUS_NOICCPRESENT; - } - else - { - *error = CCID_ERROR_SLOT_NOT_FOUND; - return CCID_COMMANDSTATUS_FAILED | CCID_ICCSTATUS_NOICCPRESENT; - } -} - - uint8_t CALLBACK_CCID_Abort(uint8_t slot, uint8_t seq, uint8_t* error) |