diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-02-27 03:17:28 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-02-27 03:17:28 +0100 |
commit | 9ce2ce35d5f94c5d0b83ca8d9ceb21c8c1cf3cd4 (patch) | |
tree | 6436b73665b3f093f498398d43a020b1a71e1137 /fw/esp32/components/eos/include | |
parent | fe1d292f241bc7a024a9c20627f6300f3ebc433b (diff) |
cell/wifi refactoring
Diffstat (limited to 'fw/esp32/components/eos/include')
-rw-r--r-- | fw/esp32/components/eos/include/cell.h | 36 | ||||
-rw-r--r-- | fw/esp32/components/eos/include/wifi.h | 9 |
2 files changed, 22 insertions, 23 deletions
diff --git a/fw/esp32/components/eos/include/cell.h b/fw/esp32/components/eos/include/cell.h index 07d1144..fa9a0e2 100644 --- a/fw/esp32/components/eos/include/cell.h +++ b/fw/esp32/components/eos/include/cell.h @@ -6,7 +6,7 @@ #define EOS_CELL_MTYPE_SMS 0x30 #define EOS_CELL_MTYPE_CBS 0x40 #define EOS_CELL_MTYPE_USSD 0x50 -#define EOS_CELL_MTYPE_DATA 0x70 +#define EOS_CELL_MTYPE_PDP 0x60 #define EOS_CELL_MTYPE_MASK 0xf0 #define EOS_CELL_MAX_MTYPE 8 @@ -16,20 +16,18 @@ #define EOS_CELL_MTYPE_UART_DATA 2 #define EOS_CELL_MTYPE_UART_TAKE 3 #define EOS_CELL_MTYPE_UART_GIVE 4 -#define EOS_CELL_MTYPE_PCM_DATA 5 -#define EOS_CELL_MTYPE_PCM_START 6 -#define EOS_CELL_MTYPE_PCM_STOP 7 -#define EOS_CELL_MTYPE_RESET 8 - -#define EOS_CELL_MTYPE_VOICE_DIAL 1 -#define EOS_CELL_MTYPE_VOICE_RING 2 -#define EOS_CELL_MTYPE_VOICE_ANSWER 3 -#define EOS_CELL_MTYPE_VOICE_HANGUP 4 -#define EOS_CELL_MTYPE_VOICE_BEGIN 5 -#define EOS_CELL_MTYPE_VOICE_END 6 -#define EOS_CELL_MTYPE_VOICE_MISS 7 -#define EOS_CELL_MTYPE_VOICE_BUSY 8 -#define EOS_CELL_MTYPE_VOICE_ERR 9 +#define EOS_CELL_MTYPE_RESET 5 + +#define EOS_CELL_MTYPE_VOICE_PCM 1 +#define EOS_CELL_MTYPE_VOICE_DIAL 2 +#define EOS_CELL_MTYPE_VOICE_RING 3 +#define EOS_CELL_MTYPE_VOICE_ANSWER 4 +#define EOS_CELL_MTYPE_VOICE_HANGUP 5 +#define EOS_CELL_MTYPE_VOICE_BEGIN 6 +#define EOS_CELL_MTYPE_VOICE_END 7 +#define EOS_CELL_MTYPE_VOICE_MISS 8 +#define EOS_CELL_MTYPE_VOICE_BUSY 9 +#define EOS_CELL_MTYPE_VOICE_ERR 10 #define EOS_CELL_MTYPE_SMS_LIST 1 #define EOS_CELL_MTYPE_SMS_SEND 2 @@ -40,9 +38,9 @@ #define EOS_CELL_MTYPE_USSD_REPLY 2 #define EOS_CELL_MTYPE_USSD_CANCEL 3 -#define EOS_CELL_MTYPE_DATA_CONFIGURE 1 -#define EOS_CELL_MTYPE_DATA_CONNECT 2 -#define EOS_CELL_MTYPE_DATA_DISCONNECT 3 +#define EOS_CELL_MTYPE_PDP_CONFIG 1 +#define EOS_CELL_MTYPE_PDP_CONNECT 2 +#define EOS_CELL_MTYPE_PDP_DISCONNECT 3 #define EOS_CELL_SMS_ADDRTYPE_INTL 1 #define EOS_CELL_SMS_ADDRTYPE_ALPHA 2 @@ -86,7 +84,7 @@ void eos_cell_pcm_stop(void); void eos_cell_voice_handler(unsigned char mtype, unsigned char *buffer, uint16_t size); void eos_cell_sms_handler(unsigned char mtype, unsigned char *buffer, uint16_t size); void eos_cell_ussd_handler(unsigned char mtype, unsigned char *buffer, uint16_t size); -void eos_cell_data_handler(unsigned char mtype, unsigned char *buffer, uint16_t size); +void eos_cell_pdp_handler(unsigned char mtype, unsigned char *buffer, uint16_t size); void eos_cell_voice_init(void); void eos_cell_sms_init(void); diff --git a/fw/esp32/components/eos/include/wifi.h b/fw/esp32/components/eos/include/wifi.h index d579fc5..11bccec 100644 --- a/fw/esp32/components/eos/include/wifi.h +++ b/fw/esp32/components/eos/include/wifi.h @@ -1,12 +1,13 @@ #define EOS_WIFI_MTYPE_SCAN 1 -#define EOS_WIFI_MTYPE_CONNECT 2 -#define EOS_WIFI_MTYPE_DISCONNECT 3 +#define EOS_WIFI_MTYPE_CONFIG 2 +#define EOS_WIFI_MTYPE_CONNECT 3 +#define EOS_WIFI_MTYPE_DISCONNECT 4 -#define EOS_WIFI_MAX_MTYPE 4 +#define EOS_WIFI_MAX_MTYPE 5 void eos_wifi_init(void); int eos_wifi_scan(void); -int eos_wifi_set_auth(char *ssid, char *pass); +int eos_wifi_set_config(char *ssid, char *pass); int eos_wifi_connect(void); int eos_wifi_disconnect(void); |