# HG changeset patch
# User František Kučera <franta-hg@frantovo.cz>
# Date 1497179273 -7200
# Node ID 514b9b433dc293f854c790d273dfff3e8f9014a9
# Parent  75edae164ebc5397550fdee2235461072fbd1c3e
lpt-signal-generator: comments

diff -r 75edae164ebc -r 514b9b433dc2 c++/lpt-signal-generator/lpt.cpp
--- a/c++/lpt-signal-generator/lpt.cpp	Sun Jun 11 12:51:19 2017 +0200
+++ b/c++/lpt-signal-generator/lpt.cpp	Sun Jun 11 13:07:53 2017 +0200
@@ -44,7 +44,12 @@
 // so "duration" means total sleep time
 
 // TODO: data types revision
+// TODO: time units s, μs, ns – naming convention / unification
 
+/**
+ * generates square wave signal on a parallel port pin with given frequency and duty cycle
+ * mode info: https://blog.frantovo.cz/c/358/Paraleln%C3%AD%20port%20jako%20gener%C3%A1tor%20sign%C3%A1lu
+ */
 int main() {
   //cout << "LPT!" << endl; // same as using printf → breaks all folllowing wprintf() calls, see note above
 
@@ -98,7 +103,7 @@
   auto calibrationCycles = 10000;
   auto calibrationSleepTime = 10;
 
-  for (auto i = calibrationCycles; i > 0;  i--) {
+  for (auto i = calibrationCycles; i > 0; i--) {
     outb(0b00000000, addr);
     usleep(calibrationSleepTime);
     outb(0b00000000, addr);