From 979d6a97a53b5c9738cfb7489ca05a3874042c8d Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 4 Sep 2022 18:26:23 +0200 Subject: wifi/cell driver improved --- fw/fe310/eos/net/cell.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'fw/fe310/eos/net/cell.h') diff --git a/fw/fe310/eos/net/cell.h b/fw/fe310/eos/net/cell.h index f04eef2..1e6d1b2 100644 --- a/fw/fe310/eos/net/cell.h +++ b/fw/fe310/eos/net/cell.h @@ -12,7 +12,7 @@ #define EOS_CELL_MAX_MTYPE 8 /* EOS_CELL_MTYPE_DEV subtypes */ -#define EOS_CELL_MTYPE_READY 1 +#define EOS_CELL_MTYPE_STATUS 1 #define EOS_CELL_MTYPE_UART_DATA 2 #define EOS_CELL_MTYPE_UART_TAKE 3 #define EOS_CELL_MTYPE_UART_GIVE 4 @@ -47,6 +47,11 @@ #define EOS_CELL_MTYPE_PDP_CONNECT 7 #define EOS_CELL_MTYPE_PDP_DISCONNECT 8 +#define EOS_CELL_STATUS_RESET 0 +#define EOS_CELL_STATUS_IDLE 1 +#define EOS_CELL_STATUS_RELAY 2 +#define EOS_CELL_STATUS_PPP 3 + #define EOS_CELL_SMS_ADDRTYPE_INTL 1 #define EOS_CELL_SMS_ADDRTYPE_ALPHA 2 #define EOS_CELL_SMS_ADDRTYPE_OTHER 3 @@ -56,6 +61,22 @@ #define EOS_CELL_PDP_SIZE_PWD 64 #define EOS_CELL_PDP_SIZE_ARG 64 +#define EOS_CELL_MAX_USSD_STR 128 +#define EOS_CELL_MAX_DIAL_STR 128 + void eos_cell_init(void); void eos_cell_set_handler(unsigned char mtype, eos_evt_handler_t handler); -eos_evt_handler_t eos_cell_get_handler(unsigned char mtype); \ No newline at end of file +eos_evt_handler_t eos_cell_get_handler(unsigned char mtype); +int eos_cell_send_buffer(unsigned char *buffer, uint16_t buf_len, uint16_t offset, int sync); + +int eos_cell_status_parse(unsigned char *buffer, uint16_t len, uint8_t *status, uint8_t *connected); +int eos_cell_status(uint8_t *status, uint8_t *connected, unsigned char *buffer); + +int eos_cell_uart_take(unsigned char *buffer, int sync); +int eos_cell_uart_give(unsigned char *buffer, int sync); +unsigned char *eos_cell_uart_data_buffer(uint16_t *offset); + +int eos_cell_voice_dial(char *num, unsigned char *buffer, int sync); +int eos_cell_voice_answer(unsigned char *buffer, int sync); +int eos_cell_voice_hangup(unsigned char *buffer, int sync); +unsigned char *eos_cell_voice_pcm_buffer(uint16_t *offset); -- cgit v1.2.3