blob: 56fd1458cce68124e64f095a2aa3acb40f40de02 (
plain)
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
|
#include "DebugPins.h"
#include <hal/nrf_gpio.h>
#ifdef USE_DEBUG_PINS
void debugpins_init() {
nrf_gpio_cfg_output(DebugPin0);
nrf_gpio_pin_clear(DebugPin0);
nrf_gpio_cfg_output(DebugPin1);
nrf_gpio_pin_clear(DebugPin1);
nrf_gpio_cfg_output(DebugPin2);
nrf_gpio_pin_clear(DebugPin2);
nrf_gpio_cfg_output(DebugPin3);
nrf_gpio_pin_clear(DebugPin3);
nrf_gpio_cfg_output(DebugPin4);
nrf_gpio_pin_clear(DebugPin4);
}
void debugpins_set(debugpins_pins pin) {
nrf_gpio_pin_set((uint32_t) (pin));
}
void debugpins_clear(debugpins_pins pin) {
nrf_gpio_pin_clear((uint32_t) (pin));
}
void debugpins_pulse(debugpins_pins pin) {
nrf_gpio_pin_set((uint32_t) (pin));
nrf_gpio_pin_clear((uint32_t) (pin));
}
#else
void debugpins_init() {
}
void debugpins_set(debugpins_pins pin) {
}
void debugpins_clear(debugpins_pins pin) {
}
void debugpins_pulse(debugpins_pins pin) {
}
#endif
|