mirror of
https://github.com/markqvist/OpenModem.git
synced 2025-08-21 21:19:27 -04:00
Added modem mode KISS commands
This commit is contained in:
parent
1c2d1b484b
commit
ede7b5c443
3 changed files with 25 additions and 1 deletions
|
@ -400,6 +400,7 @@ void kiss_serialCallback(uint8_t sbyte) {
|
|||
// TODO: Remove this
|
||||
} else if (command == CMD_PRINT_CONFIG) {
|
||||
config_print();
|
||||
kiss_output_modem_mode();
|
||||
} else if (command == CMD_AUDIO_PEAK) {
|
||||
if (sbyte == 0x01) {
|
||||
kiss_output_afsk_peak();
|
||||
|
@ -410,11 +411,28 @@ void kiss_serialCallback(uint8_t sbyte) {
|
|||
} else {
|
||||
config_enable_diagnostics();
|
||||
}
|
||||
} else if (command == CMD_MODE) {
|
||||
if (sbyte == 0x00) {
|
||||
kiss_output_modem_mode();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void kiss_output_modem_mode(void) {
|
||||
fputc(FEND, &serial->uart0);
|
||||
fputc(CMD_MODE, &serial->uart0);
|
||||
if (BITRATE == 300) {
|
||||
fputc(MODE_AFSK_300, &serial->uart0);
|
||||
} else if (BITRATE == 1200) {
|
||||
fputc(MODE_AFSK_1200, &serial->uart0);
|
||||
} else if (BITRATE == 2400) {
|
||||
fputc(MODE_AFSK_2400, &serial->uart0);
|
||||
}
|
||||
fputc(FEND, &serial->uart0);
|
||||
}
|
||||
|
||||
void kiss_output_afsk_peak(void) {
|
||||
fputc(FEND, &serial->uart0);
|
||||
fputc(CMD_AUDIO_PEAK, &serial->uart0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue