summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/net/cell.h
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/net/cell.h')
-rw-r--r--fw/fe310/eos/net/cell.h59
1 files changed, 32 insertions, 27 deletions
diff --git a/fw/fe310/eos/net/cell.h b/fw/fe310/eos/net/cell.h
index 3264022..9517d8e 100644
--- a/fw/fe310/eos/net/cell.h
+++ b/fw/fe310/eos/net/cell.h
@@ -71,30 +71,35 @@
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);
-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 buf_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_alloc(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_alloc(uint16_t *offset);
-int eos_cell_sms_send(char *addr, char *txt, unsigned char *buffer, int sync);
-int _eos_cell_sms_parse(unsigned char *buffer, uint16_t buf_len, char **addr, uint16_t *addr_len, char **txt, uint16_t *txt_len);
-int eos_cell_sms_parse(unsigned char *buffer, uint16_t buf_len, char *addr, uint16_t addr_size, char *txt, uint16_t txt_size);
-
-int eos_cell_pdp_get(unsigned char atype, char *arg, uint16_t arg_size, unsigned char *buffer);
-int eos_cell_pdp_set(unsigned char atype, char *arg, unsigned char *buffer, int sync);
-int eos_cell_pdp_get_apn(char *apn, uint16_t apn_size, unsigned char *buffer);
-int eos_cell_pdp_set_apn(char *apn, unsigned char *buffer, int sync);
-int eos_cell_pdp_get_usr(char *usr, uint16_t usr_size, unsigned char *buffer);
-int eos_cell_pdp_set_usr(char *usr, unsigned char *buffer, int sync);
-int eos_cell_pdp_get_pwd(char *pwd, uint16_t pwd_size, unsigned char *buffer);
-int eos_cell_pdp_set_pwd(char *pwd, unsigned char *buffer, int sync);
-int eos_cell_pdp_connect(unsigned char *buffer, int sync);
-int eos_cell_pdp_disconnect(unsigned char *buffer, int sync);
+
+int eos_cell_status_parse(EOSMessage *msg, uint16_t len, uint8_t *status, uint8_t *connected);
+int eos_cell_status(uint8_t *status, uint8_t *connected, EOSMessage *msg);
+
+int eos_cell_uart_take(EOSMessage *msg);
+int eos_cell_uart_give(EOSMessage *msg);
+unsigned char *eos_cell_uart_msg2data(EOSMessage *msg, uint16_t *len, uint16_t *size);
+int eos_cell_uart_send(EOSMessage *msg, uint16_t len);
+int eos_cell_uart_send_async(EOSMessage *msg, uint16_t len, int more);
+
+int eos_cell_voice_dial(char *num, EOSMessage *msg);
+int eos_cell_voice_answer(EOSMessage *msg);
+int eos_cell_voice_hangup(EOSMessage *msg);
+unsigned char *eos_cell_voice_msg2pcm(EOSMessage *msg, uint16_t *len, uint16_t *size);
+int eos_cell_voice_pcm_send(EOSMessage *msg, uint16_t len);
+int eos_cell_voice_pcm_send_async(EOSMessage *msg, uint16_t len, int more);
+
+int eos_cell_sms_send(char *addr, char *txt, EOSMessage *msg);
+int _eos_cell_sms_parse(EOSMessage *msg, uint16_t len, char **addr, uint16_t *addr_len, char **txt, uint16_t *txt_len);
+int eos_cell_sms_parse(EOSMessage *msg, uint16_t len, char *addr, uint16_t addr_size, char *txt, uint16_t txt_size);
+char *eos_cell_sms_msg2txt(EOSMessage *msg, uint16_t *len);
+
+int eos_cell_pdp_get(unsigned char atype, char *arg, uint16_t arg_size, EOSMessage *msg);
+int eos_cell_pdp_set(unsigned char atype, char *arg, EOSMessage *msg);
+int eos_cell_pdp_get_apn(char *apn, uint16_t apn_size, EOSMessage *msg);
+int eos_cell_pdp_set_apn(char *apn, EOSMessage *msg);
+int eos_cell_pdp_get_usr(char *usr, uint16_t usr_size, EOSMessage *msg);
+int eos_cell_pdp_set_usr(char *usr, EOSMessage *msg);
+int eos_cell_pdp_get_pwd(char *pwd, uint16_t pwd_size, EOSMessage *msg);
+int eos_cell_pdp_set_pwd(char *pwd, EOSMessage *msg);
+int eos_cell_pdp_connect(EOSMessage *msg);
+int eos_cell_pdp_disconnect(EOSMessage *msg);