|
Open Garden
0.10.1-21
|
Functions to activare and display (rs232) debug. More...


Go to the source code of this file.
Data Structures | |
| struct | debug_t |
Macros | |
| #define | QUOTEME_(x) #x |
| #define | QUOTEME(x) QUOTEME_(x) |
| #define | MAX_LINE_LENGHT 80 |
| #define | MAX_STRING_LENGHT 20 |
| #define | PRINT_VALUE_X_LINE 16 |
| #define | SEC_FOR_Y 5 |
| #define | GITREL "unknown" |
Functions | |
| void | debug_get_str (char *str) |
| void | debug_print_P (PGM_P string, struct debug_t *debug) |
| void | debug_print (struct debug_t *debug) |
| void | debug_version (struct debug_t *debug) |
| uint8_t | debug_wait_for_y (struct debug_t *debug) |
| void | debug_start (struct debug_t *debug) |
| void | debug_stop (struct debug_t *debug) |
| struct debug_t * | debug_init (struct debug_t *debug) |
| void | debug_free (struct debug_t *debug) |
Functions to activare and display (rs232) debug.
| #define GITREL "unknown" |
GITREL Environment check
| #define MAX_LINE_LENGHT 80 |
Maximum number of char a line can be
| #define MAX_STRING_LENGHT 20 |
Number of char a substring can be made of. Substrings are used to compose the line when, for example, conversions have to be made from int to string etc.
| #define PRINT_VALUE_X_LINE 16 |
Unused.
| #define QUOTEME | ( | x | ) | QUOTEME_(x) |
Macro example 2nd pass.
| #define QUOTEME_ | ( | x | ) | #x |
Macro example for create a function macro in 2 pass.
The scope should be #x -> f(x)
| #define SEC_FOR_Y 5 |
Seconds to wait for an answer (y/n)
| void debug_free | ( | struct debug_t * | debug | ) |
Free the allocated structure.
| void debug_get_str | ( | char * | str | ) |
Read a string from the user with echo.
Initialize the debug_t structure and ask if debug is active.
| void debug_print | ( | struct debug_t * | debug | ) |
Print the debug->line string.
| void debug_print_P | ( | PGM_P | string, |
| struct debug_t * | debug | ||
| ) |
Print a flash-stored string to the terminal.
| string | MUST be a PSTR() string. |
| debug | ptr to print space. |
| void debug_start | ( | struct debug_t * | debug | ) |
Enable debugging.
| void debug_stop | ( | struct debug_t * | debug | ) |
Disable debugging.
| void debug_version | ( | struct debug_t * | debug | ) |
Print the release version.
| uint8_t debug_wait_for_y | ( | struct debug_t * | debug | ) |
Prompt the user for and y/n answer
"Y" is 89 and "y" is 121
Exit the cicle in a bad way
1.8.13