diff options
| author | JF <jf@codingfield.com> | 2020-03-03 19:59:01 +0100 |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-03-03 19:59:01 +0100 |
| commit | 545636940f68108a361dda85e0e48a240909cf29 (patch) | |
| tree | f471cf8f60976ab1fffce747db021e5706bf60c2 /src/drivers/DebugPins.cpp | |
| parent | 79b4f006be8732663706f1177e17e52829eb661f (diff) | |
| parent | d2f725ec9bc6d848906b83ca539d873223d74648 (diff) | |
Merge branch 'littlevgl'
# Conflicts:
# src/DisplayApp/Screens/Clock.cpp
# src/DisplayApp/Screens/Clock.h
Diffstat (limited to 'src/drivers/DebugPins.cpp')
| -rw-r--r-- | src/drivers/DebugPins.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/drivers/DebugPins.cpp b/src/drivers/DebugPins.cpp new file mode 100644 index 00000000..5a12fd86 --- /dev/null +++ b/src/drivers/DebugPins.cpp @@ -0,0 +1,49 @@ +#include <hal/nrf_gpio.h> +#include "DebugPins.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
\ No newline at end of file |
