Added the ability to invert SD_DETECT for cardholders with a normally open contact to determine the presence of a card.

This commit is contained in:
Dmitriy Logachov 2021-01-13 15:10:59 +05:00
parent 596539f0cd
commit 7f8dfae211
5 changed files with 28 additions and 3 deletions

View file

@ -613,6 +613,15 @@ void kiss_serialCallback(uint8_t sbyte) {
if (sbyte == 0x00) {
kiss_output_modem_mode();
}
} else if (command == CMD_INVERT_SDDETECT) {
if (sbyte == FESC) { ESCAPE = true; } else {
if (ESCAPE) {
if (sbyte == TFEND) sbyte = FEND;
if (sbyte == TFESC) sbyte = FESC;
ESCAPE = false;
}
config_set_invert_sddetect(sbyte);
}
}
}
}