mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-30 04:19:59 -07:00
* CCID: Improve request and response data handling - Add iso7816_set_response function: serves a helpers to set SW1 and SW2 values - improved iso7816_read_response_apdu by correctly parsing Lc and Le values - add client script to make testing easier * lint and rename * Format * Review changes: pragma once, typedef * Move command/response data and datalen into respective structures * Remove conditional for Lc=0 * Fix comment: Le * Make PVS happy and fix spelling Co-authored-by: あく <alleteam@gmail.com>
21 lines
592 B
C
21 lines
592 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include "iso7816_atr.h"
|
|
#include "iso7816_t0_apdu.h"
|
|
|
|
typedef struct {
|
|
void (*iso7816_answer_to_reset)(Iso7816Atr* atr);
|
|
void (*iso7816_process_command)(
|
|
const ISO7816_Command_APDU* command,
|
|
ISO7816_Response_APDU* response);
|
|
} Iso7816Callbacks;
|
|
|
|
void iso7816_set_callbacks(Iso7816Callbacks* cb);
|
|
|
|
void iso7816_icc_power_on_callback(uint8_t* atrBuffer, uint32_t* atrlen);
|
|
void iso7816_xfr_datablock_callback(
|
|
const uint8_t* dataBlock,
|
|
uint32_t dataBlockLen,
|
|
uint8_t* responseDataBlock,
|
|
uint32_t* responseDataBlockLen); |