Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: modem_ref_helper_for_v5_3_217
Diff: modem_ref.cpp
- Revision:
- 18:a11302a76e96
- Parent:
- 17:b4ea2a912fd3
--- a/modem_ref.cpp Fri Sep 22 14:04:46 2017 +0000
+++ b/modem_ref.cpp Thu Nov 23 14:17:30 2017 +0000
@@ -520,12 +520,12 @@
DEALLOC_BUFFER(tmp);
}
-public void modem_remote_read_file(u8* itf, u8 itf_length,void *istatus ,u8 fid,void *data, u32 offset, u32 length, u8 id)
+public void modem_remote_read_file(u8* itf, u8 itf_length, void *istatus , u8 fid, void *data, u32 offset, u32 length, u8 id)
{
ALLOC_BUFFER(u8,tmp,ALP_ACTION_TAG_SIZE + ALP_ACTION_FORWARD_SIZE(itf_length) + ALP_ACTION_F_RD_DATA_SIZE_MAX);
u8* p = tmp;
- g_modem.user[id].data = (u8*)data;
- g_modem.user[id].istatus= (u8*)istatus;
+ g_modem.user[id].data = (u8*)data;
+ g_modem.user[id].istatus = (u8*)istatus;
REF_PRINT("RMT RD FILE[%d]@%d %d Bytes (itf %d Bytes)\n",fid,offset,length,itf_length);
ALP_ACTION_TAG(p,id,true);
@@ -535,6 +535,20 @@
DEALLOC_BUFFER(tmp);
}
+public void modem_remote_write_file(u8* itf, u8 itf_length, void *istatus , u8 fid, void *data, u32 offset, u32 length, u8 id)
+{
+ ALLOC_BUFFER(u8,tmp,ALP_ACTION_TAG_SIZE + ALP_ACTION_FORWARD_SIZE(itf_length) + ALP_ACTION_F_WR_DATA_SIZE_MAX(length));
+ u8* p = tmp;
+ g_modem.user[id].istatus = (u8*)istatus;
+
+ REF_PRINT("RMT WR FILE[%d]@%d %d Bytes (itf %d Bytes)\n",fid,offset,length,itf_length);
+ ALP_ACTION_TAG(p,id,true);
+ ALP_ACTION_FORWARD(p,itf,itf_length);
+ ALP_ACTION_F_WR_DATA(p,true,fid,offset,length,data);
+ SERIAL_SEND(WC_FLOW_ALP_UNS,tmp, (u8)(p-tmp));
+ DEALLOC_BUFFER(tmp);
+}
+
public void modem_enable_urc(u8 type, u8 ifid, u8 val, u8 enable, u8 id)
{
u8 tmp[ALP_ACTION_TAG_SIZE + ALP_ACTION_URCC_SIZE(ALP_URC_TYPE_LQUAL)];