-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.h
More file actions
40 lines (38 loc) · 1.1 KB
/
debug.h
File metadata and controls
40 lines (38 loc) · 1.1 KB
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
#ifndef DEBUG_H
#define DEBUG_H
#include <stdint.h>
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega2560__)
#include <avr/pgmspace.h>
#endif
#include <stdbool.h>
#include "defines.h"
#include "colors.h"
#include "flags.h"
#include "ptr24.h"
#include "io.h"
#define ERROR(X) error(F(X))
#define INFO(X) info(F(X))
#define TRACE(X) trace(F(X))
#define DEBUG_DUMPp(P,LBL) debug_dump(B3U32(P),F(LBL));
#define DEBUG_DUMP(U,LBL) debug_dump(U,F(LBL));
// #define ERROR(X)
// #define INFO(X)
// #define TRACE(X)
// #define DEBUG_DUMPp(P,LBL)
// #define DEBUG_DUMP(U,LBL)
void error(const __memx char *c);
void info(const __memx char *c);
void trace(const __memx char *c);
void dump24(uint32_t w, const __memx char *label);
void write_hex8(uint8_t b);
void write_hex16(uint16_t b);
void write_hex24(uint32_t b);
void write_hex32(uint32_t b);
bool is_in_range(uint32_t addr);
bool is_in_Wrange(uint32_t addr);
//void debug_dump(const __memx void * address, const __memx char* label);
void debug_dump(uint32_t address, const __memx char* label);
extern bool nodebug;
extern bool noinfo;
extern bool notrace;
#endif