diff options
author | Karin Hedlund <karin.hedlund@stericsson.com> | 2011-05-20 16:56:58 +0200 |
---|---|---|
committer | Karin Hedlund <karin.hedlund@stericsson.com> | 2011-05-20 16:56:58 +0200 |
commit | b76c2437f1017bda4879a3a8ee6ddd00fdb5c281 (patch) | |
tree | fc3873776155e1d5ff021ae9370264d226893c69 /riff/EraseArea.cpp |
Initial commit
Diffstat (limited to 'riff/EraseArea.cpp')
-rwxr-xr-x | riff/EraseArea.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/riff/EraseArea.cpp b/riff/EraseArea.cpp new file mode 100755 index 0000000..3de8ed0 --- /dev/null +++ b/riff/EraseArea.cpp @@ -0,0 +1,50 @@ +/* + * EraseArea.cpp + * + * Copyright (C) ST-Ericsson SA 2011 + * Authors: Srimanta Panda <srimanta.panda@stericsson.com>, + * Ola Borgelin <ola.borgelin@stericsson.com>, + * Karin Hedlund <karin.hedlund@stericsson.com>, + * Markus Andersson <markus.m.andersson@stericsson.com> for ST-Ericsson. + * License terms: 3-clause BSD license + * + */ + +/* + * @addtogroup Commands + * @{ + */ + +#include "EraseArea.h" +using namespace flash; + + +EraseArea::EraseArea(const char* path, uint64 start, uint64 length): + logger_("EraseArea") +{ + pchPath = path; + uiStart = start; + uiLength = length; +} + +int EraseArea::run(DUT* dut) +{ + logger_.log(Logger::PROGRESS, "Erasing area..."); + int error = Flash_EraseArea(dut->getLCDContext(), pchPath, uiStart, uiLength); + + if (0 != error) + { + logger_.log(Logger::ERROR,"LCD ERROR: Erase area failed %d", error); + return error; + } + + logger_.log(Logger::PROGRESS, "Erase area finished successfully"); + return error; +} + +const char * EraseArea::get_command_name() +{ + return (char *)"ERASEAREA"; +} + +/* @} */ |