update firmware.bin
[clinton/Smoothieware.git] / src / libs / utils.h
1 #ifndef utils_h
2 #define utils_h
3
4 #include <stdint.h>
5 using namespace std;
6 #include <string>
7 #include <vector>
8 using std::string;
9
10 extern volatile bool _isr_context;
11
12 string lc(const string& str);
13
14 bool is_alpha( int );
15 bool is_digit( int );
16 bool is_numeric( int );
17 bool is_alphanum( int );
18 bool is_whitespace( int );
19
20 string remove_non_number( string str );
21
22 uint16_t get_checksum(const string& to_check);
23 uint16_t get_checksum(const char* to_check);
24
25 void get_checksums(uint16_t check_sums[], const string& key);
26
27 string shift_parameter( string &parameters );
28
29 string get_arguments( string possible_command );
30
31 bool file_exists( const string file_name );
32
33 void system_reset( bool dfu= false );
34
35 string absolute_from_relative( string path );
36
37
38 #endif