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.
Dependencies: MTS-Serial libxDot-dev-mbed5-deprecated
Fork of Dot-AT-Firmware by
CommandTerminal/CmdEraseFlash.cpp@14:f9a77400b622, 2016-11-04 (annotated)
- Committer:
- Mike Fiore
- Date:
- Fri Nov 04 14:25:43 2016 -0500
- Revision:
- 14:f9a77400b622
update from git revision 2.0.16
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Mike Fiore |
14:f9a77400b622 | 1 | #include "CmdEraseFlash.h" |
| Mike Fiore |
14:f9a77400b622 | 2 | |
| Mike Fiore |
14:f9a77400b622 | 3 | CmdEraseFlash::CmdEraseFlash() : |
| Mike Fiore |
14:f9a77400b622 | 4 | Command("Erase Entire Flash ", "AT+ERASE", "Erase all configurations saved in flash memory", "1") |
| Mike Fiore |
14:f9a77400b622 | 5 | { |
| Mike Fiore |
14:f9a77400b622 | 6 | } |
| Mike Fiore |
14:f9a77400b622 | 7 | |
| Mike Fiore |
14:f9a77400b622 | 8 | uint32_t CmdEraseFlash::action(std::vector<std::string> args) |
| Mike Fiore |
14:f9a77400b622 | 9 | { |
| Mike Fiore |
14:f9a77400b622 | 10 | CommandTerminal::Dot()->eraseFlash(); |
| Mike Fiore |
14:f9a77400b622 | 11 | return 0; |
| Mike Fiore |
14:f9a77400b622 | 12 | } |
| Mike Fiore |
14:f9a77400b622 | 13 | |
| Mike Fiore |
14:f9a77400b622 | 14 | bool CmdEraseFlash::verify(std::vector<std::string> args) |
| Mike Fiore |
14:f9a77400b622 | 15 | { |
| Mike Fiore |
14:f9a77400b622 | 16 | if (args.size() == 2 && args[1] == "1") |
| Mike Fiore |
14:f9a77400b622 | 17 | return true; |
| Mike Fiore |
14:f9a77400b622 | 18 | |
| Mike Fiore |
14:f9a77400b622 | 19 | CommandTerminal::setErrorMessage("Entire flash will be erased, please provide parameter of '1'"); |
| Mike Fiore |
14:f9a77400b622 | 20 | return false; |
| Mike Fiore |
14:f9a77400b622 | 21 | } |
