summaryrefslogtreecommitdiff
path: root/code/esp32/components/eos/include
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2019-08-30 13:44:45 +0200
committerUros Majstorovic <majstor@majstor.org>2019-08-30 13:44:45 +0200
commitd4885f39f5012f082e0ebbbf7c3aae385187facf (patch)
tree0bd8862f922b70565098d3cae90db2b00b1f6975 /code/esp32/components/eos/include
parent37a18889be8efa08c9e054014ca7058768b51a61 (diff)
stub drivers added
Diffstat (limited to 'code/esp32/components/eos/include')
-rw-r--r--code/esp32/components/eos/include/bq25895.h3
-rw-r--r--code/esp32/components/eos/include/drv2605l.h3
-rw-r--r--code/esp32/components/eos/include/eos.h9
-rw-r--r--code/esp32/components/eos/include/fe310.h19
-rw-r--r--code/esp32/components/eos/include/i2c.h7
-rw-r--r--code/esp32/components/eos/include/modem.h4
-rw-r--r--code/esp32/components/eos/include/pcm.h5
-rw-r--r--code/esp32/components/eos/include/transport.h8
8 files changed, 42 insertions, 16 deletions
diff --git a/code/esp32/components/eos/include/bq25895.h b/code/esp32/components/eos/include/bq25895.h
new file mode 100644
index 0000000..b5a7f92
--- /dev/null
+++ b/code/esp32/components/eos/include/bq25895.h
@@ -0,0 +1,3 @@
+#include <stdint.h>
+
+void eos_bq25895_set_ilim(void); \ No newline at end of file
diff --git a/code/esp32/components/eos/include/drv2605l.h b/code/esp32/components/eos/include/drv2605l.h
new file mode 100644
index 0000000..de222e4
--- /dev/null
+++ b/code/esp32/components/eos/include/drv2605l.h
@@ -0,0 +1,3 @@
+#include <stdint.h>
+
+void eos_drv2605l_test(void); \ No newline at end of file
diff --git a/code/esp32/components/eos/include/eos.h b/code/esp32/components/eos/include/eos.h
index 1d35584..1b52605 100644
--- a/code/esp32/components/eos/include/eos.h
+++ b/code/esp32/components/eos/include/eos.h
@@ -1,5 +1,8 @@
-#define EOS_OK 0
-#define EOS_ERR_Q_FULL -10
+#define EOS_OK 0
+#define EOS_ERR -1
+#define EOS_ERR_Q_FULL -10
#define EOS_PRIORITY_WIFI 1
-#define EOS_PRIORITY_SPI 1 \ No newline at end of file
+#define EOS_PRIORITY_SPI 1
+#define EOS_PRIORITY_PCM 1
+#define EOS_PRIORITY_MODEM 1 \ No newline at end of file
diff --git a/code/esp32/components/eos/include/fe310.h b/code/esp32/components/eos/include/fe310.h
index f4bc787..21b12dc 100644
--- a/code/esp32/components/eos/include/fe310.h
+++ b/code/esp32/components/eos/include/fe310.h
@@ -1,18 +1,19 @@
#include <stdint.h>
-#define EOS_FE310_CMD_FLAG_ONEW 0x10
+#define EOS_FE310_CMD_FLAG_ONEW 0x10
-#define EOS_FE310_CMD_CONNECT 1
-#define EOS_FE310_CMD_DISCONNECT 2
-#define EOS_FE310_CMD_SCAN 3
-#define EOS_FE310_CMD_PKT 4
+#define EOS_FE310_CMD_WIFI_CONNECT 1
+#define EOS_FE310_CMD_WIFI_DISCONNECT 2
+#define EOS_FE310_CMD_WIFI_SCAN 3
+#define EOS_FE310_CMD_WIFI_PKT 4
+#define EOS_FE310_CMD_MODEM_DATA 5
+#define EOS_FE310_CMD_MODEM_CALL 6
-#define EOS_FE310_MAX_CMD 8
-#define EOS_FE310_SIZE_Q 64
-#define EOS_FE310_SIZE_BUF 2048
+#define EOS_FE310_MAX_CMD 8
+#define EOS_FE310_SIZE_Q 64
+#define EOS_FE310_SIZE_BUF 2048
typedef void (*eos_fe310_fptr_t) (unsigned char, unsigned char *, uint16_t);
void eos_fe310_init(void);
int eos_fe310_send(unsigned char cmd, unsigned char *buffer, uint16_t len);
-void eos_fe310_set_handler(unsigned char cmd, eos_fe310_fptr_t handler);
diff --git a/code/esp32/components/eos/include/i2c.h b/code/esp32/components/eos/include/i2c.h
new file mode 100644
index 0000000..6f89654
--- /dev/null
+++ b/code/esp32/components/eos/include/i2c.h
@@ -0,0 +1,7 @@
+#include <stdint.h>
+
+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);
diff --git a/code/esp32/components/eos/include/modem.h b/code/esp32/components/eos/include/modem.h
new file mode 100644
index 0000000..424c0db
--- /dev/null
+++ b/code/esp32/components/eos/include/modem.h
@@ -0,0 +1,4 @@
+#include <stdint.h>
+
+void eos_modem_init(void);
+ssize_t eos_modem_write(void *data, size_t size); \ No newline at end of file
diff --git a/code/esp32/components/eos/include/pcm.h b/code/esp32/components/eos/include/pcm.h
new file mode 100644
index 0000000..ef8a303
--- /dev/null
+++ b/code/esp32/components/eos/include/pcm.h
@@ -0,0 +1,5 @@
+#include <stdint.h>
+
+void eos_pcm_init(void);
+ssize_t eos_pcm_write(void *data, size_t size);
+void eos_pcm_call(void);
diff --git a/code/esp32/components/eos/include/transport.h b/code/esp32/components/eos/include/transport.h
index 9d76d1b..356014d 100644
--- a/code/esp32/components/eos/include/transport.h
+++ b/code/esp32/components/eos/include/transport.h
@@ -7,7 +7,7 @@ typedef struct EOSNetAddr {
uint16_t port;
} EOSNetAddr;
-void eos_net_init(void);
-void eos_net_connect(char *ssid, char *password);
-void eos_net_disconnect(void);
-ssize_t eos_net_send(void *msg, size_t msg_size, EOSNetAddr *addr);
+void eos_wifi_init(void);
+void eos_wifi_connect(char *ssid, char *password);
+void eos_wifi_disconnect(void);
+ssize_t eos_wifi_send(void *msg, size_t msg_size, EOSNetAddr *addr);