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.
Fork of Smoothie by
modules/utils/simpleshell/SimpleShell.h@0:31e91bb0ef3c, 2012-07-31 (annotated)
- Committer:
- scachat
- Date:
- Tue Jul 31 21:11:18 2012 +0000
- Revision:
- 0:31e91bb0ef3c
- Child:
- 2:1df0b61d3b5a
smoothie port to mbed online compiler
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
scachat | 0:31e91bb0ef3c | 1 | /* |
scachat | 0:31e91bb0ef3c | 2 | This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl). |
scachat | 0:31e91bb0ef3c | 3 | Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. |
scachat | 0:31e91bb0ef3c | 4 | Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
scachat | 0:31e91bb0ef3c | 5 | You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>. |
scachat | 0:31e91bb0ef3c | 6 | */ |
scachat | 0:31e91bb0ef3c | 7 | |
scachat | 0:31e91bb0ef3c | 8 | |
scachat | 0:31e91bb0ef3c | 9 | #ifndef simpleshell_h |
scachat | 0:31e91bb0ef3c | 10 | #define simpleshell_h |
scachat | 0:31e91bb0ef3c | 11 | |
scachat | 0:31e91bb0ef3c | 12 | #include "libs/Kernel.h" |
scachat | 0:31e91bb0ef3c | 13 | #include "libs/nuts_bolts.h" |
scachat | 0:31e91bb0ef3c | 14 | #include "libs/utils.h" |
scachat | 0:31e91bb0ef3c | 15 | #include "libs/StreamOutput.h" |
scachat | 0:31e91bb0ef3c | 16 | |
scachat | 0:31e91bb0ef3c | 17 | |
scachat | 0:31e91bb0ef3c | 18 | #define ls_command_checksum 19679 |
scachat | 0:31e91bb0ef3c | 19 | #define cd_command_checksum 11207 |
scachat | 0:31e91bb0ef3c | 20 | #define pwd_command_checksum 42060 |
scachat | 0:31e91bb0ef3c | 21 | #define cat_command_checksum 24889 |
scachat | 0:31e91bb0ef3c | 22 | #define play_command_checksum 17335 |
scachat | 0:31e91bb0ef3c | 23 | #define reset_command_checksum 27429 |
scachat | 0:31e91bb0ef3c | 24 | |
scachat | 0:31e91bb0ef3c | 25 | class SimpleShell : public Module { |
scachat | 0:31e91bb0ef3c | 26 | public: |
scachat | 0:31e91bb0ef3c | 27 | SimpleShell(){} |
scachat | 0:31e91bb0ef3c | 28 | |
scachat | 0:31e91bb0ef3c | 29 | virtual void on_module_loaded(); |
scachat | 0:31e91bb0ef3c | 30 | virtual void on_console_line_received( void* argument ); |
scachat | 0:31e91bb0ef3c | 31 | virtual void on_main_loop( void* argument ); |
scachat | 0:31e91bb0ef3c | 32 | string absolute_from_relative( string path ); |
scachat | 0:31e91bb0ef3c | 33 | void ls_command( string parameters, StreamOutput* stream ); |
scachat | 0:31e91bb0ef3c | 34 | void cd_command( string parameters, StreamOutput* stream ); |
scachat | 0:31e91bb0ef3c | 35 | void pwd_command( string parameters, StreamOutput* stream ); |
scachat | 0:31e91bb0ef3c | 36 | void cat_command( string parameters, StreamOutput* stream ); |
scachat | 0:31e91bb0ef3c | 37 | void play_command( string parameters, StreamOutput* stream ); |
scachat | 0:31e91bb0ef3c | 38 | void reset_command(string parameters, StreamOutput* stream ); |
scachat | 0:31e91bb0ef3c | 39 | |
scachat | 0:31e91bb0ef3c | 40 | string current_path; |
scachat | 0:31e91bb0ef3c | 41 | bool playing_file; |
scachat | 0:31e91bb0ef3c | 42 | StreamOutput* current_stream; |
scachat | 0:31e91bb0ef3c | 43 | FILE* current_file_handler; |
scachat | 0:31e91bb0ef3c | 44 | }; |
scachat | 0:31e91bb0ef3c | 45 | |
scachat | 0:31e91bb0ef3c | 46 | |
scachat | 0:31e91bb0ef3c | 47 | #endif |