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: include/d7a_fs.h
- Revision:
- 29:8e7c5c1e9aab
- Parent:
- 27:934ab7455115
- Child:
- 30:d775c1409849
--- a/include/d7a_fs.h Mon Apr 04 14:00:28 2016 +0000 +++ b/include/d7a_fs.h Tue May 03 16:53:52 2016 +0000 @@ -6,7 +6,7 @@ #include "d7a_common.h" #include "d7a_com.h" -#define TO_FS (200) +#define TO_FS (2000) typedef uint32_t (*WriteFileFunction)( const uint8_t file_id, const uint16_t offset, @@ -18,6 +18,10 @@ const uint16_t file_size, uint8_t* buf); +typedef uint32_t (*TouchFileFunction)( const uint8_t file_id, + const uint16_t offset, + const uint16_t file_size); + // PROP Byte #define FS_BFO_STORAGE_CLASS 0 #define FS_BFO_ACT_COND 4 @@ -72,13 +76,15 @@ #define FS_OP_NULL 0 #define FS_OP_RD 1 #define FS_OP_WR 4 +#define FS_OP_TOUCH 7 // Not in ALP but '7' is still in 'write' actions area #define FS_OP_STAT 16 -#define FS_OP_DSTAT 30 // Variant of STAT for distant files +#define FS_OP_DSTAT 30 // Not in ALP: Variant of STAT for distant files #define FS_OP_CREATE 17 #define FS_OP_FLUSH 20 #define FS_OP_RETSTAT 32 #define FS_OP_RETDATA 34 + // FS/COM-FS Status-codes. Mimics ALP ones. enum { FS_STAT_PENDING = 1, @@ -210,7 +216,7 @@ uint32_t alloc; } d7a_fs_properties_t; -void d7a_fs_open(WriteFileFunction write_file, ReadFileFunction read_file); +void d7a_fs_open(WriteFileFunction write_file, ReadFileFunction read_file, TouchFileFunction touch_file); void* d7a_fs_wait_done(uint32_t millisec = osWaitForever); void d7a_fs_new_pkt(d7a_com_rx_msg_t* pkt); d7a_com_rx_msg_t* d7a_fs_wait_pkt( uint32_t millisec = osWaitForever );