smoothie port to mbed online compiler (smoothieware.org)

Dependencies:   mbed

For documentation, license, ..., please check http://smoothieware.org/

This version has been tested with a 3 axis machine

Committer:
scachat
Date:
Tue Jul 31 21:11:18 2012 +0000
Revision:
0:31e91bb0ef3c
smoothie port to mbed online compiler

Who changed what in which revision?

UserRevisionLine numberNew 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 #ifndef CONFIG_H
scachat 0:31e91bb0ef3c 9 #define CONFIG_H
scachat 0:31e91bb0ef3c 10 #include "libs/Kernel.h"
scachat 0:31e91bb0ef3c 11 #include "libs/utils.h"
scachat 0:31e91bb0ef3c 12 #include "libs/Pin.h"
scachat 0:31e91bb0ef3c 13 #include "ConfigValue.h"
scachat 0:31e91bb0ef3c 14 #include "ConfigCache.h"
scachat 0:31e91bb0ef3c 15 #include "ConfigSource.h"
scachat 0:31e91bb0ef3c 16 #include "libs/ConfigSources/FileConfigSource.h"
scachat 0:31e91bb0ef3c 17
scachat 0:31e91bb0ef3c 18 #define error(...) (fprintf(stderr, __VA_ARGS__), exit(1))
scachat 0:31e91bb0ef3c 19
scachat 0:31e91bb0ef3c 20 using namespace std;
scachat 0:31e91bb0ef3c 21 #include <vector>
scachat 0:31e91bb0ef3c 22 #include <string>
scachat 0:31e91bb0ef3c 23 #include <stdio.h>
scachat 0:31e91bb0ef3c 24
scachat 0:31e91bb0ef3c 25 #define LOCAL_CONFIGSOURCE_CHECKSUM 13581
scachat 0:31e91bb0ef3c 26 #define SD_CONFIGSOURCE_CHECKSUM 19415
scachat 0:31e91bb0ef3c 27
scachat 0:31e91bb0ef3c 28
scachat 0:31e91bb0ef3c 29 class Config : public Module {
scachat 0:31e91bb0ef3c 30 public:
scachat 0:31e91bb0ef3c 31 Config();
scachat 0:31e91bb0ef3c 32
scachat 0:31e91bb0ef3c 33 virtual void on_module_loaded();
scachat 0:31e91bb0ef3c 34 virtual void on_console_line_received( void* argument );
scachat 0:31e91bb0ef3c 35 void config_cache_load();
scachat 0:31e91bb0ef3c 36 void config_cache_clear();
scachat 0:31e91bb0ef3c 37 void set_string( string setting , string value);
scachat 0:31e91bb0ef3c 38
scachat 0:31e91bb0ef3c 39 ConfigValue* value(uint16_t check_sum);
scachat 0:31e91bb0ef3c 40 ConfigValue* value(uint16_t check_sum_a, uint16_t check_sum_b);
scachat 0:31e91bb0ef3c 41 ConfigValue* value(uint16_t check_sum_a, uint16_t check_sum_b, uint16_t check_sum_c );
scachat 0:31e91bb0ef3c 42 ConfigValue* value(vector<uint16_t> check_sums );
scachat 0:31e91bb0ef3c 43
scachat 0:31e91bb0ef3c 44 void get_module_list(vector<uint16_t>* list, uint16_t family);
scachat 0:31e91bb0ef3c 45
scachat 0:31e91bb0ef3c 46 bool has_characters(uint16_t check_sum, string str );
scachat 0:31e91bb0ef3c 47
scachat 0:31e91bb0ef3c 48 ConfigCache config_cache; // A cache in which ConfigValues are kept
scachat 0:31e91bb0ef3c 49 vector<ConfigSource*> config_sources; // A list of all possible coniguration sources
scachat 0:31e91bb0ef3c 50 bool config_cache_loaded; // Whether or not the cache is currently popluated
scachat 0:31e91bb0ef3c 51 };
scachat 0:31e91bb0ef3c 52
scachat 0:31e91bb0ef3c 53 #endif