summaryrefslogtreecommitdiff
path: root/fw/esp32/components/eos/include
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-03-30 13:22:57 +0200
committerUros Majstorovic <majstor@majstor.org>2022-03-30 13:22:57 +0200
commit55474b81146327e8cfa7702fa9366cc7da6562e7 (patch)
treeb6bf9fe0258ab88d12717bb31ecdf4eda0ffa073 /fw/esp32/components/eos/include
parentc6962c5700f99441538dafa346626bb7e6d12488 (diff)
sock api fixed; net reply messages fixed
Diffstat (limited to 'fw/esp32/components/eos/include')
-rw-r--r--fw/esp32/components/eos/include/cell.h11
-rw-r--r--fw/esp32/components/eos/include/net.h4
-rw-r--r--fw/esp32/components/eos/include/wifi.h4
3 files changed, 12 insertions, 7 deletions
diff --git a/fw/esp32/components/eos/include/cell.h b/fw/esp32/components/eos/include/cell.h
index fa9a0e2..2cbba7e 100644
--- a/fw/esp32/components/eos/include/cell.h
+++ b/fw/esp32/components/eos/include/cell.h
@@ -54,6 +54,9 @@
#define EOS_CELL_UART_SIZE_BUF 1024
+#define EOS_CELL_MAX_USSD_STR 256
+#define EOS_CELL_MAX_DIAL_STR 256
+
void eos_cell_init(void);
void eos_modem_init(void);
@@ -81,10 +84,10 @@ int eos_cell_pcm_push(unsigned char *data, size_t size);
void eos_cell_pcm_start(void);
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_pdp_handler(unsigned char mtype, unsigned char *buffer, uint16_t size);
+void eos_cell_voice_handler(unsigned char mtype, unsigned char *buffer, uint16_t buf_len);
+void eos_cell_sms_handler(unsigned char mtype, unsigned char *buffer, uint16_t buf_len);
+void eos_cell_ussd_handler(unsigned char mtype, unsigned char *buffer, uint16_t buf_len);
+void eos_cell_pdp_handler(unsigned char mtype, unsigned char *buffer, uint16_t buf_len);
void eos_cell_voice_init(void);
void eos_cell_sms_init(void);
diff --git a/fw/esp32/components/eos/include/net.h b/fw/esp32/components/eos/include/net.h
index cf0cb6b..5bccc57 100644
--- a/fw/esp32/components/eos/include/net.h
+++ b/fw/esp32/components/eos/include/net.h
@@ -5,6 +5,7 @@
#define EOS_NET_SIZE_BUF EOS_NET_MTU
#define EOS_NET_MTYPE_SOCK 1
+#define EOS_NET_MTYPE_RNG 3
#define EOS_NET_MTYPE_POWER 4
#define EOS_NET_MTYPE_WIFI 5
@@ -15,7 +16,7 @@
#define EOS_NET_MAX_MTYPE 8
#define EOS_NET_MTYPE_FLAG_ONEW 0x40
-#define EOS_NET_MTYPE_FLAG_REPW 0x80
+#define EOS_NET_MTYPE_FLAG_REPL 0x80
#define EOS_NET_MTYPE_FLAG_MASK 0xc0
/* esp32 specific */
@@ -29,6 +30,7 @@ void eos_net_init(void);
unsigned char *eos_net_alloc(void);
void eos_net_free(unsigned char *buf);
int eos_net_send(unsigned char mtype, unsigned char *buffer, uint16_t len);
+void eos_net_reply(unsigned char mtype, unsigned char *buffer, uint16_t len);
void eos_net_set_handler(unsigned char mtype, eos_net_fptr_t handler);
void eos_net_sleep_done(uint8_t mode);
void eos_net_wake(uint8_t source, uint8_t mode);
diff --git a/fw/esp32/components/eos/include/wifi.h b/fw/esp32/components/eos/include/wifi.h
index 11bccec..5a668fb 100644
--- a/fw/esp32/components/eos/include/wifi.h
+++ b/fw/esp32/components/eos/include/wifi.h
@@ -1,5 +1,5 @@
#define EOS_WIFI_MTYPE_SCAN 1
-#define EOS_WIFI_MTYPE_CONFIG 2
+#define EOS_WIFI_MTYPE_AUTH 2
#define EOS_WIFI_MTYPE_CONNECT 3
#define EOS_WIFI_MTYPE_DISCONNECT 4
@@ -8,6 +8,6 @@
void eos_wifi_init(void);
int eos_wifi_scan(void);
-int eos_wifi_set_config(char *ssid, char *pass);
+int eos_wifi_auth(char *ssid, char *pass);
int eos_wifi_connect(void);
int eos_wifi_disconnect(void);