summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/arm_atsam/main_arm_atsam.c
diff options
context:
space:
mode:
authorpatrickmt <40182064+patrickmt@users.noreply.github.com>2018-10-09 21:14:13 +0200
committerJack Humbert <jack.humb@gmail.com>2018-10-10 19:49:01 +0200
commitab91e07753720f8114d6c427139a1436e6efa3ce (patch)
treeb2ba658e12b5396726945a6a22cb111013a1544e /tmk_core/protocol/arm_atsam/main_arm_atsam.c
parentf2965e1eeaf1769e106145a9d19f102fcd8fe4d4 (diff)
downloadqmk_firmware-ab91e07753720f8114d6c427139a1436e6efa3ce.tar.gz
qmk_firmware-ab91e07753720f8114d6c427139a1436e6efa3ce.tar.xz
Massdrop keyboards console device support for hid_listen
Added hid_listen USB device for arm_atsam USB protocol. Debug printing is now done through the console device (CONSOLE_ENABLE = yes) rather than the virtser device, for viewing in hid_listen. Function dpf(...) renamed to CDC_printf(...) and should now be called directly if intending to print to the virtual serial device.
Diffstat (limited to 'tmk_core/protocol/arm_atsam/main_arm_atsam.c')
-rw-r--r--tmk_core/protocol/arm_atsam/main_arm_atsam.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c
index 676dac4ea..54d056a14 100644
--- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c
+++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c
@@ -276,9 +276,9 @@ int main(void)
host_set_driver(&arm_atsam_driver);
-#ifdef VIRTSER_ENABLE
+#ifdef CONSOLE_ENABLE
uint64_t next_print = 0;
-#endif //VIRTSER_ENABLE
+#endif //CONSOLE_ENABLE
v_5v_avg = adc_get(ADC_5V);
@@ -290,15 +290,17 @@ int main(void)
main_subtasks(); //Note these tasks will also be run while waiting for USB keyboard polling intervals
-#ifdef VIRTSER_ENABLE
+#ifdef CONSOLE_ENABLE
if (CLK_get_ms() > next_print)
{
next_print = CLK_get_ms() + 250;
- dprintf("5v=%u 5vu=%u dlow=%u dhi=%u gca=%u gcd=%u\r\n",v_5v,v_5v_avg,v_5v_avg-V5_LOW,v_5v_avg-V5_HIGH,gcr_actual,gcr_desired);
+ //Add any debug information here that you want to see very often
+ //dprintf("5v=%u 5vu=%u dlow=%u dhi=%u gca=%u gcd=%u\r\n", v_5v, v_5v_avg, v_5v_avg - V5_LOW, v_5v_avg - V5_HIGH, gcr_actual, gcr_desired);
}
-#endif //VIRTSER_ENABLE
+#endif //CONSOLE_ENABLE
}
+
return 1;
}