diff options
Diffstat (limited to 'tmk_core/common/print.c')
-rw-r--r-- | tmk_core/common/print.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/tmk_core/common/print.c b/tmk_core/common/print.c index 00489557f..07aef0b0e 100644 --- a/tmk_core/common/print.c +++ b/tmk_core/common/print.c | |||
@@ -2,17 +2,17 @@ | |||
2 | /* Very basic print functions, intended to be used with usb_debug_only.c | 2 | /* Very basic print functions, intended to be used with usb_debug_only.c |
3 | * http://www.pjrc.com/teensy/ | 3 | * http://www.pjrc.com/teensy/ |
4 | * Copyright (c) 2008 PJRC.COM, LLC | 4 | * Copyright (c) 2008 PJRC.COM, LLC |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy | 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
7 | * of this software and associated documentation files (the "Software"), to deal | 7 | * of this software and associated documentation files (the "Software"), to deal |
8 | * in the Software without restriction, including without limitation the rights | 8 | * in the Software without restriction, including without limitation the rights |
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
10 | * copies of the Software, and to permit persons to whom the Software is | 10 | * copies of the Software, and to permit persons to whom the Software is |
11 | * furnished to do so, subject to the following conditions: | 11 | * furnished to do so, subject to the following conditions: |
12 | * | 12 | * |
13 | * The above copyright notice and this permission notice shall be included in | 13 | * The above copyright notice and this permission notice shall be included in |
14 | * all copies or substantial portions of the Software. | 14 | * all copies or substantial portions of the Software. |
15 | * | 15 | * |
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
@@ -25,28 +25,23 @@ | |||
25 | #include <stdint.h> | 25 | #include <stdint.h> |
26 | #include "print.h" | 26 | #include "print.h" |
27 | 27 | ||
28 | |||
29 | #ifndef NO_PRINT | 28 | #ifndef NO_PRINT |
30 | 29 | ||
31 | #if defined(__AVR__) | 30 | # if defined(__AVR__) |
32 | |||
33 | #define sendchar(c) xputc(c) | ||
34 | 31 | ||
32 | # define sendchar(c) xputc(c) | ||
35 | 33 | ||
36 | void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) | 34 | void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) { xdev_out(sendchar_func); } |
37 | { | ||
38 | xdev_out(sendchar_func); | ||
39 | } | ||
40 | 35 | ||
41 | #elif defined(PROTOCOL_CHIBIOS) /* __AVR__ */ | 36 | # elif defined(PROTOCOL_CHIBIOS) /* __AVR__ */ |
42 | 37 | ||
43 | // don't need anything extra | 38 | // don't need anything extra |
44 | 39 | ||
45 | #elif defined(__arm__) /* __AVR__ */ | 40 | # elif defined(__arm__) /* __AVR__ */ |
46 | 41 | ||
47 | // TODO | 42 | // TODO |
48 | //void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) { } | 43 | // void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) { } |
49 | 44 | ||
50 | #endif /* __AVR__ */ | 45 | # endif /* __AVR__ */ |
51 | 46 | ||
52 | #endif | 47 | #endif |