AT command interface for mdot forced to asia interfaces
Dependencies: MTS-Serial libmDot-mbed5
Fork of Dot-AT-Firmware by
CommandTerminal/CmdWriteProtectedConfig.cpp@19:79c906b2c53c, 2018-05-01 (annotated)
- Committer:
- brettsawyers
- Date:
- Tue May 01 01:40:37 2018 +0000
- Revision:
- 19:79c906b2c53c
- Parent:
- 14:f9a77400b622
uploading to team
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Mike Fiore |
14:f9a77400b622 | 1 | #include "CmdWriteProtectedConfig.h" |
Mike Fiore |
14:f9a77400b622 | 2 | |
Mike Fiore |
14:f9a77400b622 | 3 | CmdWriteProtectedConfig::CmdWriteProtectedConfig() : |
Mike Fiore |
14:f9a77400b622 | 4 | Command("Write Protected Config", "AT&WP", "Write protected config to flash (DeviceId and Frequency Band)", "NONE") |
Mike Fiore |
14:f9a77400b622 | 5 | { |
Mike Fiore |
14:f9a77400b622 | 6 | } |
Mike Fiore |
14:f9a77400b622 | 7 | |
Mike Fiore |
14:f9a77400b622 | 8 | uint32_t CmdWriteProtectedConfig::action(std::vector<std::string> args) |
Mike Fiore |
14:f9a77400b622 | 9 | { |
Mike Fiore |
14:f9a77400b622 | 10 | if (!CommandTerminal::Dot()->saveProtectedConfig()) { |
Mike Fiore |
14:f9a77400b622 | 11 | CommandTerminal::setErrorMessage("Failed to save to flash"); |
Mike Fiore |
14:f9a77400b622 | 12 | return 1; |
Mike Fiore |
14:f9a77400b622 | 13 | } |
Mike Fiore |
14:f9a77400b622 | 14 | |
Mike Fiore |
14:f9a77400b622 | 15 | return 0; |
Mike Fiore |
14:f9a77400b622 | 16 | } |