From 118f2a8178ded200007e267e6b7cea42d5830c57 Mon Sep 17 00:00:00 2001 From: Sucareto <28331534+Sucareto@users.noreply.github.com> Date: Sat, 23 Apr 2022 15:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E6=9E=84=E4=BD=93=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=8F=AF=E5=8F=98=E9=95=BF=E5=BA=A6=E6=95=B0=E7=BB=84=EF=BC=9B?= =?UTF-8?q?=E8=AF=BB=E5=8F=96felica=20block=E5=A4=B1=E8=B4=A5=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=BF=94=E5=9B=9E=E7=A9=BA=E6=95=B0=E6=8D=AE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd.h b/cmd.h index 577e918..b6b9a85 100644 --- a/cmd.h +++ b/cmd.h @@ -72,7 +72,7 @@ typedef union packet_req { uint8_t blockList[1][2];//长度可变 uint8_t blockData[16];//WriteWithoutEncryption,ignore }; - uint8_t felica_payload[113]; + uint8_t felica_payload[1]; }; }; }; @@ -118,7 +118,7 @@ typedef union packet_res { uint8_t numBlock;//NDA_06 uint8_t blockData[1][1][16];//NDA_06 }; - uint8_t felica_payload[112]; + uint8_t felica_payload[1]; }; }; }; @@ -295,9 +295,7 @@ static void sg_nfc_cmd_felica_encap() { for (uint8_t i = 0; i < req.numBlock; i++) { uint16_t blockList[1] = {(uint16_t)(req.blockList[i][0] << 8 | req.blockList[i][1])}; if (nfc.felica_ReadWithoutEncryption(1, serviceCodeList, 1, blockList, res.blockData[i]) != 1) { - sg_res_init(); - res.status = 1; - return; + memset(res.blockData[i], 0, 16);//dummy data } } res.RW_status[0] = 0;