Committer:
Sergunb
Date:
Mon Sep 04 12:04:13 2017 +0000
Revision:
0:8f0d870509fe
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Sergunb 0:8f0d870509fe 1 /*
Sergunb 0:8f0d870509fe 2 print.h - Functions for formatting output strings
Sergunb 0:8f0d870509fe 3 Part of Grbl
Sergunb 0:8f0d870509fe 4
Sergunb 0:8f0d870509fe 5 Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
Sergunb 0:8f0d870509fe 6 Copyright (c) 2009-2011 Simen Svale Skogsrud
Sergunb 0:8f0d870509fe 7
Sergunb 0:8f0d870509fe 8 Grbl is free software: you can redistribute it and/or modify
Sergunb 0:8f0d870509fe 9 it under the terms of the GNU General Public License as published by
Sergunb 0:8f0d870509fe 10 the Free Software Foundation, either version 3 of the License, or
Sergunb 0:8f0d870509fe 11 (at your option) any later version.
Sergunb 0:8f0d870509fe 12
Sergunb 0:8f0d870509fe 13 Grbl is distributed in the hope that it will be useful,
Sergunb 0:8f0d870509fe 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
Sergunb 0:8f0d870509fe 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Sergunb 0:8f0d870509fe 16 GNU General Public License for more details.
Sergunb 0:8f0d870509fe 17
Sergunb 0:8f0d870509fe 18 You should have received a copy of the GNU General Public License
Sergunb 0:8f0d870509fe 19 along with Grbl. If not, see <http://www.gnu.org/licenses/>.
Sergunb 0:8f0d870509fe 20 */
Sergunb 0:8f0d870509fe 21
Sergunb 0:8f0d870509fe 22 #ifndef print_h
Sergunb 0:8f0d870509fe 23 #define print_h
Sergunb 0:8f0d870509fe 24
Sergunb 0:8f0d870509fe 25
Sergunb 0:8f0d870509fe 26 void printString(const char *s);
Sergunb 0:8f0d870509fe 27
Sergunb 0:8f0d870509fe 28 void printPgmString(const char *s);
Sergunb 0:8f0d870509fe 29
Sergunb 0:8f0d870509fe 30 void printInteger(long n);
Sergunb 0:8f0d870509fe 31
Sergunb 0:8f0d870509fe 32 void print_uint32_base10(uint32_t n);
Sergunb 0:8f0d870509fe 33
Sergunb 0:8f0d870509fe 34 // Prints an uint8 variable in base 10.
Sergunb 0:8f0d870509fe 35 void print_uint8_base10(uint8_t n);
Sergunb 0:8f0d870509fe 36
Sergunb 0:8f0d870509fe 37 // Prints an uint8 variable in base 2 with desired number of desired digits.
Sergunb 0:8f0d870509fe 38 void print_uint8_base2_ndigit(uint8_t n, uint8_t digits);
Sergunb 0:8f0d870509fe 39
Sergunb 0:8f0d870509fe 40 void printFloat(float n, uint8_t decimal_places);
Sergunb 0:8f0d870509fe 41
Sergunb 0:8f0d870509fe 42 // Floating value printing handlers for special variables types used in Grbl.
Sergunb 0:8f0d870509fe 43 // - CoordValue: Handles all position or coordinate values in inches or mm reporting.
Sergunb 0:8f0d870509fe 44 // - RateValue: Handles feed rate and current velocity in inches or mm reporting.
Sergunb 0:8f0d870509fe 45 void printFloat_CoordValue(float n);
Sergunb 0:8f0d870509fe 46 void printFloat_RateValue(float n);
Sergunb 0:8f0d870509fe 47
Sergunb 0:8f0d870509fe 48 // Debug tool to print free memory in bytes at the called point. Not used otherwise.
Sergunb 0:8f0d870509fe 49 void printFreeMemory();
Sergunb 0:8f0d870509fe 50
Sergunb 0:8f0d870509fe 51 #endif