summaryrefslogtreecommitdiff
path: root/hid/pico/src/ph_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'hid/pico/src/ph_debug.c')
-rw-r--r--hid/pico/src/ph_debug.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hid/pico/src/ph_debug.c b/hid/pico/src/ph_debug.c
index 5063c0d8..79eb64a3 100644
--- a/hid/pico/src/ph_debug.c
+++ b/hid/pico/src/ph_debug.c
@@ -41,12 +41,16 @@ void ph_debug_init(bool enable_uart) {
gpio_set_dir(_ACT_PIN, GPIO_OUT);
}
+void ph_debug_act(bool flag) {
+ gpio_put(_ACT_PIN, flag);
+}
+
void ph_debug_act_pulse(u64 delay_ms) {
static bool flag = false;
static u64 next_ts = 0;
const u64 now_ts = time_us_64();
if (now_ts >= next_ts) {
- gpio_put(_ACT_PIN, flag);
+ ph_debug_act(flag);
flag = !flag;
next_ts = now_ts + (delay_ms * 1000);
}