Mercurial > louis > kiibohd-controller
comparison Bootloader/debug.h @ 339:2f415c0b4b28
Adding missing debug header.
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Tue, 09 Jun 2015 10:02:05 -0700 |
parents | |
children | 66eccdd9ced5 |
comparison
equal
deleted
inserted
replaced
338:80bca7f4808b | 339:2f415c0b4b28 |
---|---|
1 /* Copyright (C) 2015 by Jacob Alexander | |
2 * | |
3 * Permission is hereby granted, free of charge, to any person obtaining a copy | |
4 * of this software and associated documentation files (the "Software"), to deal | |
5 * in the Software without restriction, including without limitation the rights | |
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
7 * copies of the Software, and to permit persons to whom the Software is | |
8 * furnished to do so, subject to the following conditions: | |
9 * | |
10 * The above copyright notice and this permission notice shall be included in | |
11 * all copies or substantial portions of the Software. | |
12 * | |
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
19 * THE SOFTWARE. | |
20 */ | |
21 | |
22 #ifndef debug_h__ | |
23 #define debug_h__ | |
24 | |
25 // ----- Includes ----- | |
26 | |
27 // Compiler Includes | |
28 | |
29 // Project Includes | |
30 | |
31 | |
32 // ----- Defines ----- | |
33 | |
34 #define NL "\r\n" | |
35 //#define FLASH_DEBUG // XXX: Use when there are USB flashing issues | |
36 | |
37 | |
38 | |
39 // ----- Macros ----- | |
40 | |
41 #define print(str) Output_putstr(str) | |
42 #define printNL(str) Output_putstr(str NL) | |
43 | |
44 | |
45 | |
46 // ----- Functions ----- | |
47 | |
48 #if defined(_mk20dx256vlh7_) | |
49 int Output_putstr( char* str ); | |
50 | |
51 int uart_serial_write( const void *buffer, uint32_t size ); | |
52 | |
53 void uart_serial_setup(); | |
54 | |
55 // Convenience | |
56 #define printHex(hex) printHex_op(hex, 1) | |
57 void printHex_op( uint32_t in, uint8_t op ); | |
58 | |
59 #else | |
60 #define Output_putstr(str) | |
61 #define uart_serial_write(buf,size) | |
62 #define uart_serial_setup() | |
63 #define printHex(hex) | |
64 #define printHex_op(in,op) | |
65 #endif | |
66 | |
67 #endif | |
68 |