X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Finterfaces%2FBlockWrite.nc;h=5ecd3d11dbc0ae07ae50a1a5669b472299215d1f;hb=847b2d55b02b069ae22d1f3297bc32fb6aafb924;hp=c229848db92500e6f369d78dbe817312dcde92c3;hpb=1ba974b83d19fc41bf80acd52726f36f7f1df297;p=tinyos-2.x.git diff --git a/tos/interfaces/BlockWrite.nc b/tos/interfaces/BlockWrite.nc index c229848d..5ecd3d11 100644 --- a/tos/interfaces/BlockWrite.nc +++ b/tos/interfaces/BlockWrite.nc @@ -44,9 +44,11 @@ interface BlockWrite { * Initiate a write operation within a given volume. On SUCCESS, the * writeDone event will signal completion of the * operation. + *

+ * Between two erases, no byte may be written more than once. * * @param addr starting address to begin write. - * @param buf buffer to write data from. + * @param 'void* COUNT(len) buf' buffer to write data from. * @param len number of bytes to write. * @return *

  • SUCCESS if the request was accepted, @@ -57,11 +59,11 @@ interface BlockWrite { /** * Signals the completion of a write operation. However, data is not - * guaranteed to survive a power-cycle unless a commit operation has + * guaranteed to survive a power-cycle unless a sync operation has * been completed. * * @param addr starting address of write. - * @param buf buffer that written data was read from. + * @param 'void* COUNT(len) buf' buffer that written data was read from. * @param len number of bytes written. * @param error SUCCESS if the operation was successful, FAIL if * it failed @@ -89,25 +91,23 @@ interface BlockWrite { event void eraseDone(error_t error); /** - * Initiate a commit operation and finialize any additional writes - * to the volume. A verify operation from BlockRead can - * be done to check if the data has been modified since. A commit - * operation must be issued to ensure that data is stored in - * non-volatile storage. On SUCCES, the commitDone - * event will signal completion of the operation. + * Initiate a sync operation to finalize writes to the volume. A + * sync operation must be issued to ensure that data is stored in + * non-volatile storage. On SUCCES, the syncDone event + * will signal completion of the operation. * * @return *
  • SUCCESS if the request was accepted, *
  • EBUSY if a request is already being processed. */ - command error_t commit(); + command error_t sync(); /** - * Signals the completion of a commit operation. All written data is + * Signals the completion of a sync operation. All written data is * flushed to non-volatile storage after this event. * * @param error SUCCESS if the operation was successful, FAIL if * it failed */ - event void commitDone(error_t error); + event void syncDone(error_t error); }