change(nfc): modify nfc card config
This commit is contained in:
@@ -106,6 +106,26 @@ static void nfc_card_emulation_send_frame(const u8 *frame, u8 length)
|
||||
DP1312EA_WriteRawRC(BitFramingReg, 0x80);
|
||||
}
|
||||
|
||||
static void nfc_card_emulation_configure_iso_dep(void)
|
||||
{
|
||||
static const u8 card_config[] = {
|
||||
0x44, 0x00, /* SENS_RES / ATQA */
|
||||
0xAA, 0xBB, 0xCC, /* NFCID1; first byte 08 is added by PN512 */
|
||||
0x20, /* SEL_RES / SAK: ISO-DEP supported */
|
||||
0x01, 0xFE, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88,
|
||||
0x07, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0xFF, 0xFF,
|
||||
0x88
|
||||
};
|
||||
|
||||
DP1312EA_PcdConfigISOType('K');
|
||||
ql_rtos_task_sleep_ms(2);
|
||||
DP1312EA_WriteFIFO((u8 *)card_config, sizeof(card_config));
|
||||
ql_rtos_task_sleep_ms(2);
|
||||
DP1312EA_WriteRawRC(CommandReg, DP1312EA_MEM);
|
||||
DP1312EA_WriteRawRC(CommandReg, DP1312EA_AUTOCOLL);
|
||||
}
|
||||
|
||||
static void nfc_card_emulation_start(void)
|
||||
{
|
||||
DP1312EA_WriteRawRC(CommandReg, DP1312EA_IDLE);
|
||||
@@ -113,9 +133,9 @@ static void nfc_card_emulation_start(void)
|
||||
DP1312EA_WriteRawRC(DivIrqReg, 0x7F);
|
||||
DP1312EA_SetBitMask(FIFOLevelReg, 0x80);
|
||||
|
||||
DP1312EA_Simulate_Card();
|
||||
nfc_card_emulation_configure_iso_dep();
|
||||
nfc_card_emulation_log_status("started");
|
||||
printf("NFC phase-2 probe: ATQA=44 00, UID=08 AA BB CC, SAK=00\r\n");
|
||||
printf("NFC phase-2 probe: ATQA=44 00, UID=08 AA BB CC, SAK=20\r\n");
|
||||
}
|
||||
|
||||
static void nfc_card_emulation_task(void)
|
||||
|
||||
Reference in New Issue
Block a user