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.
Fork of d7a_1x by
Diff: src/d7a_fs.cpp
- Revision:
- 41:a924aa709b6f
- Parent:
- 38:c1e7f97ab396
- Child:
- 44:8ebe6b70f932
diff -r b4df548bd9d8 -r a924aa709b6f src/d7a_fs.cpp
--- a/src/d7a_fs.cpp Mon Aug 29 15:05:07 2016 +0000
+++ b/src/d7a_fs.cpp Tue Aug 30 10:48:11 2016 +0000
@@ -199,13 +199,13 @@
- switch (FS_PHY_TYPE(props->type))
+ switch (FS_MEM_TYPE(props->type))
{
case EEPROM:
case RAM:
case PFLASH:
id = d7a_fs_get_req_id();
- DPRINT("CrD[%d](%d)\r\n", fid, id);
+ DPRINT("CrD[%d](%d) type:0x%02X\r\n", fid, id, props->type);
// Build WR command
uint8_t* buf = (uint8_t*)MALLOC(sizeof(d7a_fs_com_req_t) + sizeof(d7a_fs_properties_t));
d7a_fs_com_req_t* buf_req = (d7a_fs_com_req_t*)buf;
@@ -220,7 +220,7 @@
break;
// Wrong type
default:
- ASSERT(false, "FS:post_distant_create wrong file type %x\n", FS_PHY_TYPE(props->type));
+ ASSERT(false, "FS:post_distant_create wrong file type %x\n", FS_MEM_TYPE(props->type));
break;
}
@@ -237,10 +237,10 @@
if (!d7a_fs_hdr(fid, &hdr))
{
// If file is not found locally, it is a distant file
- hdr.bf.type |= FS_TYPE_DISTANT;
+ hdr.byte.type |= FS_TYPE_DISTANT;
}
- if(hdr.bf.type & FS_TYPE_DISTANT) // XXX: HOST only
+ if (FS_DISTANT_TYPE(hdr.byte.type) == HOST) // XXX: HOST only
{
id = d7a_fs_get_req_id();
DPRINT("RdP[%d](%d) @:%d %d bytes\r\n", fid, id, offset, length);
@@ -260,17 +260,18 @@
}
-
#define OP_SIZE_RD 11
#define OP_SIZE_WR 11
#define OP_SIZE_TOUCH 11
+#define OP_SIZE_SYNC 11
#define OP_SIZE_STAT 3
#define OP_SIZE_FLUSH 3
#define OP_SIZE_CREATE 11
#define OP_SIZE_RETSTAT (3+4)
#define OP_SIZE_RETDATA (3+4)
-uint8_t k_valid_cmd[] = {FS_OP_RD, FS_OP_WR, FS_OP_TOUCH ,FS_OP_STAT, FS_OP_FLUSH, FS_OP_CREATE};
-uint8_t k_valid_size[]= {OP_SIZE_RD,OP_SIZE_WR,OP_SIZE_TOUCH,OP_SIZE_STAT,OP_SIZE_FLUSH,OP_SIZE_CREATE};
+uint8_t k_valid_cmd[] = {FS_OP_RD, FS_OP_WR, FS_OP_TOUCH ,FS_OP_STAT, FS_OP_FLUSH, FS_OP_CREATE, FS_OP_SYNC};
+uint8_t k_valid_size[]= {OP_SIZE_RD,OP_SIZE_WR,OP_SIZE_TOUCH,OP_SIZE_STAT,OP_SIZE_FLUSH,OP_SIZE_CREATE,OP_SIZE_SYNC};
+
