diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-05-06 11:38:29 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-05-06 11:38:29 +0200 |
commit | 2b73dd935359e57ca32f87e3afd2435d5991685e (patch) | |
tree | e18a35cb41f018f1ad37ba2a20b4be2dc7e9b45a /code/esp32/components/eos/cell.c | |
parent | 03925afaa3117243a7b29fa4327ea378c3e6eee6 (diff) |
at cmd processing; pppos driver
Diffstat (limited to 'code/esp32/components/eos/cell.c')
-rw-r--r-- | code/esp32/components/eos/cell.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/code/esp32/components/eos/cell.c b/code/esp32/components/eos/cell.c index 26ad454..138a4e4 100644 --- a/code/esp32/components/eos/cell.c +++ b/code/esp32/components/eos/cell.c @@ -7,6 +7,8 @@ #include "net.h" #include "cell.h" +static uint8_t cell_mode; + static void cell_handler(unsigned char _mtype, unsigned char *buffer, uint16_t size) { uint8_t mtype = buffer[0]; @@ -15,10 +17,11 @@ static void cell_handler(unsigned char _mtype, unsigned char *buffer, uint16_t s eos_modem_write(buffer+1, size-1); break; case EOS_CELL_MTYPE_DATA_START: + cell_mode = eos_modem_get_mode(); eos_modem_set_mode(EOS_CELL_UART_MODE_RELAY); break; case EOS_CELL_MTYPE_DATA_STOP: - eos_modem_set_mode(0); + eos_modem_set_mode(cell_mode); break; case EOS_CELL_MTYPE_AUDIO: eos_pcm_push(buffer+1, size-1); |