-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdebug.h
43 lines (34 loc) · 1.22 KB
/
debug.h
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
/*
* Copyright Ben XO https://github.com/ben-xo All rights reserved.
*/
#ifndef _DEBUG_H
#define _DEBUG_H
#include <Arduino.h>
#include <DigitalIO.h>
#include "config.h"
#ifdef DEBUG_SAMPLE_RATE_PIN
extern DigitalPin<DEBUG_SAMPLE_RATE_PIN> debug_sample_rate_pin;
#define DEBUG_SAMPLE_RATE_HIGH() (debug_sample_rate_pin.high())
#define DEBUG_SAMPLE_RATE_LOW() (debug_sample_rate_pin.low())
#else
#define DEBUG_SAMPLE_RATE_HIGH() ()
#define DEBUG_SAMPLE_RATE_LOW() ()
#endif
#ifdef DEBUG_FRAME_RATE_PIN
extern DigitalPin<DEBUG_FRAME_RATE_PIN> debug_frame_rate_pin;
#define DEBUG_FRAME_RATE_HIGH() (debug_frame_rate_pin.high())
#define DEBUG_FRAME_RATE_LOW() (debug_frame_rate_pin.low())
#else
#define DEBUG_FRAME_RATE_HIGH() ()
#define DEBUG_FRAME_RATE_LOW() ()
#endif
#ifdef DEBUG_AUDIO_PROCESSING_RATE_PIN
extern DigitalPin<DEBUG_AUDIO_PROCESSING_RATE_PIN> debug_audio_processing_rate_pin;
#define DEBUG_AUDIO_PROCESSING_RATE_HIGH() (debug_audio_processing_rate_pin.high())
#define DEBUG_AUDIO_PROCESSING_RATE_LOW() (debug_audio_processing_rate_pin.low())
#else
#define DEBUG_AUDIO_PROCESSING_RATE_HIGH() ()
#define DEBUG_AUDIO_PROCESSING_RATE_LOW() ()
#endif
void setup_debug();
#endif /* _DEBUG_H */