summaryrefslogtreecommitdiff
path: root/usb-i2c-sl018
diff options
context:
space:
mode:
Diffstat (limited to 'usb-i2c-sl018')
-rw-r--r--usb-i2c-sl018/tuer-rfid.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usb-i2c-sl018/tuer-rfid.c b/usb-i2c-sl018/tuer-rfid.c
index 3d47edd..5b08f16 100644
--- a/usb-i2c-sl018/tuer-rfid.c
+++ b/usb-i2c-sl018/tuer-rfid.c
@@ -291,7 +291,7 @@ void handle_cmd(uint8_t cmd)
case 's': //get eeprom size
fprintf(usb,"%d\n\r",EEPROM_SIZE);
break;
- default: fprintf(usb, "error\n\r"); return;
+ default: fprintf(usb, "error, unknown command %2X\n\r",cmd); return;
}
}
@@ -310,7 +310,12 @@ void card_in_action(void)
if (0<type && type < 7)
{
if(check_card(&twi_message->data[0],twi_message->len-1-sizeof(twi_message->command)-sizeof(twi_message->status)))
+ {
+ sl018_send_buffer_check_error(SL018CMD_ComRedLedOn);
fprintf(usb,"open\n\r");
+ _delay_ms(255);
+ sl018_send_buffer_check_error(SL018CMD_ComRedLedOff);
+ }
} else {
fprintf(usb,"Unknown Card Type %02x\n\r",type);
}