Sergey Pastor / grbl1
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers print.h Source File

print.h

00001 /*
00002   print.h - Functions for formatting output strings
00003   Part of Grbl
00004 
00005   Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
00006   Copyright (c) 2009-2011 Simen Svale Skogsrud
00007 
00008   Grbl is free software: you can redistribute it and/or modify
00009   it under the terms of the GNU General Public License as published by
00010   the Free Software Foundation, either version 3 of the License, or
00011   (at your option) any later version.
00012 
00013   Grbl is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016   GNU General Public License for more details.
00017 
00018   You should have received a copy of the GNU General Public License
00019   along with Grbl.  If not, see <http://www.gnu.org/licenses/>.
00020 */
00021 
00022 #ifndef print_h
00023 #define print_h
00024 
00025 
00026 void printString(const char *s);
00027 
00028 void printPgmString(const char *s);
00029 
00030 void printInteger(long n);
00031 
00032 void print_uint32_base10(uint32_t n);
00033 
00034 // Prints an uint8 variable in base 10.
00035 void print_uint8_base10(uint8_t n);
00036 
00037 // Prints an uint8 variable in base 2 with desired number of desired digits.
00038 void print_uint8_base2_ndigit(uint8_t n, uint8_t digits);
00039 
00040 void printFloat(float n, uint8_t decimal_places);
00041 
00042 // Floating value printing handlers for special variables types used in Grbl.
00043 //  - CoordValue: Handles all position or coordinate values in inches or mm reporting.
00044 //  - RateValue: Handles feed rate and current velocity in inches or mm reporting.
00045 void printFloat_CoordValue(float n);
00046 void printFloat_RateValue(float n);
00047 
00048 // Debug tool to print free memory in bytes at the called point. Not used otherwise.
00049 void printFreeMemory();
00050 
00051 #endif