This commit is contained in:
iceman1001 2019-03-18 22:04:53 +01:00
commit 4288e9db73
4 changed files with 22 additions and 6 deletions

View file

@ -322,6 +322,9 @@ static int ul_read(uint8_t page, uint8_t *response, uint16_t responseLength) {
static int ul_comp_write(uint8_t page, uint8_t *data, uint8_t datalen) {
if (data == NULL)
return -1;
uint8_t cmd[18];
memset(cmd, 0x00, sizeof(cmd));
datalen = (datalen > 16) ? 16 : datalen;
@ -330,7 +333,7 @@ static int ul_comp_write(uint8_t page, uint8_t *data, uint8_t datalen) {
cmd[1] = page;
memcpy(cmd + 2, data, datalen);
uint8_t response[1] = {0xff};
uint8_t response[1] = {0xFF};
ul_send_cmd_raw(cmd, 2 + datalen, response, sizeof(response));
// ACK
if (response[0] == 0x0a) return 0;
@ -948,7 +951,7 @@ int CmdHF14AMfUInfo(const char *Cmd) {
uint8_t pwd[4] = {0, 0, 0, 0};
uint8_t *key = pwd;
uint8_t pack[4] = {0, 0, 0, 0};
int len = 0;
int len;
char tempStr[50];
while (param_getchar(Cmd, cmdp) != 0x00 && !errors) {