-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.hpp
60 lines (53 loc) · 1.28 KB
/
config.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include "dll.hpp"
// VIRTUAL DLL TEST
#define DLL_TEST
#define DEBUG_DLL_TEST
// DLL DEBUGGING
// #define DEBUG_DLL
// #define DEBUG_DLL_FRAMES
#define DEBUG_DLL_STEPS
// PRINT ESC AND FLAGS
#define PRINT_ESC_FLAG
// MEMORY DEBUGGING
// #define DEBUG_MEM
// #define DEBUG_MEM_ELABORATE
#ifdef WINDOWS
#include <stdio.h>
#define put_ch(ch) putchar(ch)
#define put_str(str) printf(str)
#ifndef PRINT_ESC_FLAG
#define put_hex(hex) printf("0x%02X", hex)
#else
#define put_hex(hex)\
if (hex == FLAG) {\
printf("FLAG");\
} else if (hex == ESC) {\
printf(" ESC");\
} else {\
printf("0x%02X", hex);\
}
#endif
#define put_uint8(uint8) printf("%u", uint8)
#define put_uint16(uint16) printf("%u", uint16)
#else // AVR
#include "uart.h"
#include <util/delay.h>
#endif
// Define DEBUG_DLL if DEBUG_DLL_FRAMES or DEBUG_DLL_STEPS is defined
#ifdef DEBUG_DLL_STEPS
#ifndef DEBUG_DLL_FRAMES
#define DEBUG_DLL_FRAMES
#endif
#endif
#ifdef DEBUG_DLL_FRAMES
#ifndef DEBUG_DLL
#define DEBUG_DLL
#endif
#endif
// Define DEBUG_MEM if DEBUG_MEM_ELABORATE is defined
#ifdef DEBUG_MEM_ELABORATE
#ifndef DEBUG_MEM
#define DEBUG_MEM
#endif
#endif