mirror of
https://github.com/markqvist/OpenModem.git
synced 2025-05-21 15:50:32 -04:00
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:
parent
596539f0cd
commit
7f8dfae211
5 changed files with 28 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#define CMD_NMEA 0x40
|
||||
#define CMD_PRINT_CONFIG 0xF0
|
||||
#define CMD_RETURN 0xFF
|
||||
#define CMD_INVERT_SDDETECT 0x15
|
||||
|
||||
void kiss_init(AX25Ctx *ax25, Afsk *afsk, Serial *ser);
|
||||
void kiss_messageCallback(AX25Ctx *ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue