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.h
- Revision:
- 67:9ac9d109b80a
- Parent:
- 66:492b1d7ba370
- Child:
- 68:d2778c6abf1a
--- a/include/d7a.h Fri Oct 21 15:31:45 2016 +0000 +++ b/include/d7a.h Wed Oct 26 10:01:26 2016 +0000 @@ -23,6 +23,8 @@ #define D7A_NBID(nbid) (nbid >= 32)? D7A_CTF_VAL(8,1) : D7A_CTF_VAL(nbid,0) +#define D7A_ROOT_KEY_SIZE (8) // 16 bytes max + //====================================================================== // Enums @@ -510,7 +512,8 @@ //====================================================================== d7a_msg_t** d7a_read(const uint8_t file_id, const uint32_t offset, - const uint32_t size, + const uint32_t size, + const uint8_t* root_key = NULL, d7a_addressee_t* addressee = NULL, alp_rpol_t retry = ALP_RPOL_ONESHOT); @@ -527,14 +530,21 @@ /// @param resp Wait to see if write is OK /// @return d7a_errors_t Error code //====================================================================== -d7a_msg_t** d7a_write(const uint8_t file_id, - const uint32_t offset, - const uint32_t size, - const uint8_t* const buf, +d7a_msg_t** d7a_write(const uint8_t file_id, + const uint32_t offset, + const uint32_t size, + const uint8_t* const buf, + const uint8_t* root_key = NULL, d7a_addressee_t* addressee = NULL, alp_rpol_t retry = ALP_RPOL_ONESHOT, bool resp = true); +d7a_msg_t** d7a_flush(const uint8_t file_id, + const uint8_t* root_key = NULL, + d7a_addressee_t* addressee = NULL, + alp_rpol_t retry = ALP_RPOL_ONESHOT, + bool resp = true); + //====================================================================== // d7a_notify //----------------------------------------------------------------------