summaryrefslogtreecommitdiff
path: root/fw/esp32/components/eos/include
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-02-24 19:54:18 +0100
committerUros Majstorovic <majstor@majstor.org>2021-02-24 19:54:18 +0100
commit4dea6262b57f614cabd5cf4fa96c1e3d83c45fb4 (patch)
tree765eb9b4322c6158089232cccf6a30eb62ba90d9 /fw/esp32/components/eos/include
parent3050565531af2b3a09f2213893f10c64cf9fe43f (diff)
upgraded to esp-idf 4.2
Diffstat (limited to 'fw/esp32/components/eos/include')
-rw-r--r--fw/esp32/components/eos/include/cell.h31
-rw-r--r--fw/esp32/components/eos/include/i2c.h4
-rw-r--r--fw/esp32/components/eos/include/power.h2
-rw-r--r--fw/esp32/components/eos/include/wifi.h8
4 files changed, 25 insertions, 20 deletions
diff --git a/fw/esp32/components/eos/include/cell.h b/fw/esp32/components/eos/include/cell.h
index 89f3372..07d1144 100644
--- a/fw/esp32/components/eos/include/cell.h
+++ b/fw/esp32/components/eos/include/cell.h
@@ -1,23 +1,25 @@
#include <sys/types.h>
#include <stdint.h>
-#define EOS_CELL_MTYPE_DEV 0x00
-#define EOS_CELL_MTYPE_VOICE 0x10
-#define EOS_CELL_MTYPE_SMS 0x20
-#define EOS_CELL_MTYPE_CBS 0x30
-#define EOS_CELL_MTYPE_USSD 0x40
+#define EOS_CELL_MTYPE_DEV 0x10
+#define EOS_CELL_MTYPE_VOICE 0x20
+#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_MASK 0xf0
#define EOS_CELL_MAX_MTYPE 8
-#define EOS_CELL_MTYPE_READY 0
-#define EOS_CELL_MTYPE_UART_DATA 1
-#define EOS_CELL_MTYPE_UART_TAKE 2
-#define EOS_CELL_MTYPE_UART_GIVE 3
-#define EOS_CELL_MTYPE_PCM_DATA 4
-#define EOS_CELL_MTYPE_PCM_START 5
-#define EOS_CELL_MTYPE_PCM_STOP 6
+/* EOS_CELL_MTYPE_DEV subtypes */
+#define EOS_CELL_MTYPE_READY 1
+#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
@@ -25,7 +27,9 @@
#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_MISSED 7
+#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_SMS_LIST 1
#define EOS_CELL_MTYPE_SMS_SEND 2
@@ -66,6 +70,7 @@ int eos_modem_take(uint32_t timeout);
void eos_modem_give(void);
void eos_modem_sleep(uint8_t mode);
void eos_modem_wake(uint8_t source, uint8_t mode);
+int eos_modem_reset(void);
void eos_ppp_set_apn(char *apn);
void eos_ppp_set_auth(char *user, char *pass);
diff --git a/fw/esp32/components/eos/include/i2c.h b/fw/esp32/components/eos/include/i2c.h
index 144f5e1..f014141 100644
--- a/fw/esp32/components/eos/include/i2c.h
+++ b/fw/esp32/components/eos/include/i2c.h
@@ -4,6 +4,6 @@
void eos_i2c_init(void);
int eos_i2c_read(uint8_t addr, uint8_t reg, uint8_t *data, size_t len);
-uint8_t eos_i2c_read8(uint8_t addr, uint8_t reg);
int eos_i2c_write(uint8_t addr, uint8_t reg, uint8_t *data, size_t len);
-void eos_i2c_write8(uint8_t addr, uint8_t reg, uint8_t data);
+int eos_i2c_read8(uint8_t addr, uint8_t reg, uint8_t *data);
+int eos_i2c_write8(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/fw/esp32/components/eos/include/power.h b/fw/esp32/components/eos/include/power.h
index 0a57b19..3d2e0bc 100644
--- a/fw/esp32/components/eos/include/power.h
+++ b/fw/esp32/components/eos/include/power.h
@@ -1,6 +1,6 @@
#include <stdint.h>
-#define EOS_PWR_MTYPE_BUTTON 0
+#define EOS_PWR_MTYPE_BUTTON 1
#define EOS_PWR_WAKE_RST 0
#define EOS_PWR_WAKE_BTN 1
diff --git a/fw/esp32/components/eos/include/wifi.h b/fw/esp32/components/eos/include/wifi.h
index 6009f7c..d579fc5 100644
--- a/fw/esp32/components/eos/include/wifi.h
+++ b/fw/esp32/components/eos/include/wifi.h
@@ -1,8 +1,8 @@
-#define EOS_WIFI_MTYPE_SCAN 0
-#define EOS_WIFI_MTYPE_CONNECT 1
-#define EOS_WIFI_MTYPE_DISCONNECT 2
+#define EOS_WIFI_MTYPE_SCAN 1
+#define EOS_WIFI_MTYPE_CONNECT 2
+#define EOS_WIFI_MTYPE_DISCONNECT 3
-#define EOS_WIFI_MAX_MTYPE 3
+#define EOS_WIFI_MAX_MTYPE 4
void eos_wifi_init(void);