Commit | Line | Data |
---|---|---|
be7f67cd | 1 | #pragma once |
4eb9c745 | 2 | |
423df6df | 3 | #include <stdint.h> |
4eb9c745 | 4 | #include <string> |
5efaa1b1 | 5 | #include <vector> |
7c801094 | 6 | |
29e809e0 | 7 | std::string lc(const std::string& str); |
4eb9c745 | 8 | |
a2970685 MM |
9 | bool is_alpha( int ); |
10 | bool is_digit( int ); | |
11 | bool is_numeric( int ); | |
12 | bool is_alphanum( int ); | |
13 | bool is_whitespace( int ); | |
14 | ||
29e809e0 JM |
15 | std::vector<std::string> split(const char *str, char c = ','); |
16 | std::vector<float> parse_number_list(const char *str); | |
17 | std::vector<uint32_t> parse_number_list(const char *str, uint8_t radix); | |
f6fc8c0d | 18 | |
29e809e0 | 19 | std::string remove_non_number( std::string str ); |
a699b669 | 20 | |
29e809e0 | 21 | uint16_t get_checksum(const std::string& to_check); |
d5d3d675 | 22 | uint16_t get_checksum(const char* to_check); |
4eb9c745 | 23 | |
29e809e0 | 24 | void get_checksums(uint16_t check_sums[], const std::string& key); |
5efaa1b1 | 25 | |
29e809e0 | 26 | std::string shift_parameter( std::string ¶meters ); |
4eb9c745 | 27 | |
29e809e0 | 28 | std::string get_arguments( const std::string& possible_command ); |
cebe90b6 | 29 | |
29e809e0 | 30 | bool file_exists( const std::string file_name ); |
8d857d2e | 31 | |
2742fca9 | 32 | void system_reset( bool dfu= false ); |
4eb9c745 | 33 | |
29e809e0 | 34 | std::string absolute_from_relative( std::string path ); |
4eb9c745 | 35 | |
7c801094 | 36 | int append_parameters(char *buf, std::vector<std::pair<char,float>> params, size_t bufsize); |
29e809e0 | 37 | std::string wcs2gcode(int wcs); |
be7f67cd JM |
38 | void safe_delay_us(uint32_t delay); |
39 | void safe_delay_ms(uint32_t delay); | |
4eb9c745 | 40 | |
29e809e0 JM |
41 | #define confine(value, min, max) (((value) < (min))?(min):(((value) > (max))?(max):(value))) |
42 | ||
43 | //#define dd(...) LPC_GPIO2->FIODIR = 0xffff; LPC_GPIO2->FIOCLR = 0xffff; LPC_GPIO2->FIOSET = __VA_ARGS__ |