2021-10-13 16:08:35 -04:00
|
|
|
#include "drivers/DebugPins.h"
|
2020-11-14 23:04:22 -05:00
|
|
|
#include <hal/nrf_gpio.h>
|
2020-03-01 15:00:59 -05:00
|
|
|
|
|
|
|
#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);
|
|
|
|
}
|
2023-01-03 09:05:30 -05:00
|
|
|
|
2020-03-01 15:00:59 -05:00
|
|
|
void debugpins_set(debugpins_pins pin) {
|
2022-05-09 11:14:42 -04:00
|
|
|
nrf_gpio_pin_set(static_cast<uint32_t>(pin));
|
2020-03-01 15:00:59 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void debugpins_clear(debugpins_pins pin) {
|
2022-05-09 11:14:42 -04:00
|
|
|
nrf_gpio_pin_clear(static_cast<uint32_t>(pin));
|
2020-03-01 15:00:59 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void debugpins_pulse(debugpins_pins pin) {
|
2022-05-09 11:14:42 -04:00
|
|
|
nrf_gpio_pin_set(static_cast<uint32_t>(pin));
|
|
|
|
nrf_gpio_pin_clear(static_cast<uint32_t>(pin));
|
2020-03-01 15:00:59 -05:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
void debugpins_init() {
|
|
|
|
}
|
2023-01-03 09:05:30 -05:00
|
|
|
|
2020-03-01 15:00:59 -05:00
|
|
|
void debugpins_set(debugpins_pins pin) {
|
|
|
|
}
|
|
|
|
|
|
|
|
void debugpins_clear(debugpins_pins pin) {
|
|
|
|
}
|
|
|
|
|
|
|
|
void debugpins_pulse(debugpins_pins pin) {
|
|
|
|
}
|
|
|
|
|
2022-05-09 11:14:42 -04:00
|
|
|
#endif
|