summaryrefslogtreecommitdiff
path: root/tmk_core/common/chibios/printf.h
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2020-05-30 13:14:59 -0700
committerGitHub <noreply@github.com>2020-05-30 13:14:59 -0700
commitfced377ac007d27f2650ccffbe0b18abcdcfe23d (patch)
treebd5b141987394a5a16cfc416bfe2b9efdb14d067 /tmk_core/common/chibios/printf.h
parent7b8a013826ad90714a05ea522de53adf964ab3b9 (diff)
2020 May 30 Breaking Changes Update (#9215)
* Branch point for 2020 May 30 Breaking Change * Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954) * Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957) * Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958) * Migrate `ACTION_LAYER_MODS` to `LM()` (#8959) * Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968) * Convert V-USB usbdrv to a submodule (#8321) * Unify Tap Hold functions and documentation (#8348) * Changing board names to prevent confusion (#8412) * Move the Keyboardio Model01 to a keyboardio/ subdir (#8499) * Move spaceman keyboards (#8830) * Migrate miscellaneous `fn_actions` entries (#8977) * Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979) * Organizing my keyboards (plaid, tartan, ergoinu) (#8537) * Refactor Lily58 to use split_common (#6260) * Refactor zinc to use split_common (#7114) * Add a message if bin/qmk doesn't work (#9000) * Fix conflicting types for 'tfp_printf' (#8269) * Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480) * Refactor and updates to TKC1800 code (#8472) * Switch to qmk forks for everything (#9019) * audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484) * Audio enable corrections (2/3) (#8903) * Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582) * Audio enable corrections (Part 4) (#8974) * Fix typo from PR7114 (#9171) * Augment future branch Changelogs (#8978) * Revert "Branch point for 2020 May 30 Breaking Change"
Diffstat (limited to 'tmk_core/common/chibios/printf.h')
-rw-r--r--tmk_core/common/chibios/printf.h110
1 files changed, 0 insertions, 110 deletions
diff --git a/tmk_core/common/chibios/printf.h b/tmk_core/common/chibios/printf.h
deleted file mode 100644
index 775459e1e8..0000000000
--- a/tmk_core/common/chibios/printf.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * found at: http://www.sparetimelabs.com/tinyprintf/tinyprintf.php
- * and: http://www.sparetimelabs.com/printfrevisited/printfrevisited.php
- */
-
-/*
-File: printf.h
-
-Copyright (C) 2004 Kustaa Nyholm
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-See the GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-This library is realy just two files: 'printf.h' and 'printf.c'.
-
-They provide a simple and small (+200 loc) printf functionality to
-be used in embedded systems.
-
-I've found them so usefull in debugging that I do not bother with a
-debugger at all.
-
-They are distributed in source form, so to use them, just compile them
-into your project.
-
-Two printf variants are provided: printf and sprintf.
-
-The formats supported by this implementation are: 'd' 'u' 'c' 's' 'x' 'X'.
-
-Zero padding and field width are also supported.
-
-If the library is compiled with 'PRINTF_SUPPORT_LONG' defined then the
-long specifier is also
-supported. Note that this will pull in some long math routines (pun intended!)
-and thus make your executable noticably longer.
-
-The memory foot print of course depends on the target cpu, compiler and
-compiler options, but a rough guestimate (based on a H8S target) is about
-1.4 kB for code and some twenty 'int's and 'char's, say 60 bytes of stack space.
-Not too bad. Your milage may vary. By hacking the source code you can
-get rid of some hunred bytes, I'm sure, but personally I feel the balance of
-functionality and flexibility versus code size is close to optimal for
-many embedded systems.
-
-To use the printf you need to supply your own character output function,
-something like :
-
- void putc ( void* p, char c)
- {
- while (!SERIAL_PORT_EMPTY) ;
- SERIAL_PORT_TX_REGISTER = c;
- }
-
-Before you can call printf you need to initialize it to use your
-character output function with something like:
-
- init_printf(NULL,putc);
-
-Notice the 'NULL' in 'init_printf' and the parameter 'void* p' in 'putc',
-the NULL (or any pointer) you pass into the 'init_printf' will eventually be
-passed to your 'putc' routine. This allows you to pass some storage space (or
-anything realy) to the character output function, if necessary.
-This is not often needed but it was implemented like that because it made
-implementing the sprintf function so neat (look at the source code).
-
-The code is re-entrant, except for the 'init_printf' function, so it
-is safe to call it from interupts too, although this may result in mixed output.
-If you rely on re-entrancy, take care that your 'putc' function is re-entrant!
-
-The printf and sprintf functions are actually macros that translate to
-'tfp_printf' and 'tfp_sprintf'. This makes it possible
-to use them along with 'stdio.h' printf's in a single source file.
-You just need to undef the names before you include the 'stdio.h'.
-Note that these are not function like macros, so if you have variables
-or struct members with these names, things will explode in your face.
-Without variadic macros this is the best we can do to wrap these
-fucnction. If it is a problem just give up the macros and use the
-functions directly or rename them.
-
-For further details see source code.
-
-regs Kusti, 23.10.2004
-*/
-
-#ifndef __TFP_PRINTF__
-#define __TFP_PRINTF__
-
-#include <stdarg.h>
-
-void init_printf(void* putp, void (*putf)(void*, char));
-
-int tfp_printf(const char* fmt, ...);
-int tfp_sprintf(char* s, const char* fmt, ...);
-
-void tfp_format(void* putp, void (*putf)(void*, char), const char* fmt, va_list va);
-
-#define printf tfp_printf
-#define sprintf tfp_sprintf
-
-#endif