X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Flib%2Fnet%2FDeluge%2FFlashVolumeManager%2FFlashVolumeManagerP.nc;h=b91f194bee9f4ded4544df14a5b030819dd0ba19;hp=06420ce4a02ab4037f13cd7937738a9cf2d6eb98;hb=809036bc77a8366b0f9aa2d78cdcacdcc4dc1379;hpb=62b84950912c1c033c401fb0b2a1efaceec78280 diff --git a/tos/lib/net/Deluge/FlashVolumeManager/FlashVolumeManagerP.nc b/tos/lib/net/Deluge/FlashVolumeManager/FlashVolumeManagerP.nc index 06420ce4..b91f194b 100644 --- a/tos/lib/net/Deluge/FlashVolumeManager/FlashVolumeManagerP.nc +++ b/tos/lib/net/Deluge/FlashVolumeManager/FlashVolumeManagerP.nc @@ -45,7 +45,7 @@ implementation typedef nx_struct SerialReqPacket { nx_uint8_t cmd; nx_uint8_t imgNum; - nx_uint16_t offset; + nx_uint32_t offset; nx_uint16_t len; nx_uint8_t data[0]; } SerialReqPacket; @@ -200,7 +200,11 @@ implementation switch (request->cmd) { case CMD_ERASE: // === Erases a volume === state = S_ERASE; +#if defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS) || defined(PLATFORM_EPIC) + error = FAIL; +#else error = call BlockWrite.erase[imgNum](); +#endif break; case CMD_WRITE: // === Writes to a volume === state = S_WRITE;