+ printT55xxBlock(blk); \r
+ return 1;\r
+}\r
+\r
+int CmdT55xxReadBlock(const char *Cmd) {\r
+ uint8_t block = REGULAR_READ_MODE_BLOCK;\r
+ uint32_t password = 0; //default to blank Block 7\r
+ bool usepwd = false;\r
+ bool override = false;\r
+ bool page1 = false;\r
+ bool errors = false;\r
+ uint8_t cmdp = 0;\r
+ while(param_getchar(Cmd, cmdp) != 0x00 && !errors) {\r
+ switch(param_getchar(Cmd, cmdp)) {\r
+ case 'h':\r
+ case 'H':\r
+ return usage_t55xx_read();\r
+ case 'b':\r
+ case 'B':\r
+ errors |= param_getdec(Cmd, cmdp+1, &block);\r
+ cmdp += 2;\r
+ break;\r
+ case 'o':\r
+ case 'O':\r
+ override = TRUE;\r
+ cmdp++;\r
+ break;\r
+ case 'p':\r
+ case 'P':\r
+ password = param_get32ex(Cmd, cmdp+1, 0, 16);\r
+ usepwd = true;\r
+ cmdp += 2;\r
+ break;\r
+ case '1':\r
+ page1 = true;\r
+ cmdp++;\r
+ break;\r
+ default:\r
+ PrintAndLog("Unknown parameter '%c'", param_getchar(Cmd, cmdp));\r
+ errors = true;\r
+ break;\r
+ }\r
+ }\r
+ if (errors) return usage_t55xx_read();\r
+\r
+ if (block > 7 && block != REGULAR_READ_MODE_BLOCK ) {\r
+ PrintAndLog("Block must be between 0 and 7");\r
+ return 0;\r
+ }\r
+ PrintAndLog("Reading Page %d:", page1); \r
+ PrintAndLog("blk | hex data | binary");\r
+ return T55xxReadBlock(block, page1, usepwd, override, password);\r