summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-11-30 13:50:04 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-11-30 13:50:04 +0100
commitdae84b7e7f6290ff96cc41b59cab268243063c76 (patch)
tree67efeb67e6d357bc553f840499448cfbd881bf57 /src/driver
parent3f6539e947e10859a81f808263d53e989e070e46 (diff)
add aemr_transition_sync driver (for evaluation purposes only)
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/aemr_transition_sync.cc58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/driver/aemr_transition_sync.cc b/src/driver/aemr_transition_sync.cc
new file mode 100644
index 0000000..b7881a4
--- /dev/null
+++ b/src/driver/aemr_transition_sync.cc
@@ -0,0 +1,58 @@
+#include "driver/aemr_transition_sync.h"
+#include "driver/gpio.h"
+#include "arch.h"
+
+void AEMRTransitionSync::setup()
+{
+ gpio.led_off(0);
+}
+
+void AEMRTransitionSync::transBlip()
+{
+ gpio.led_on(1);
+ gpio.led_off(1);
+}
+
+void AEMRTransitionSync::trans10u()
+{
+ gpio.led_on(1);
+ arch.delay_us(10);
+ gpio.led_off(1);
+}
+
+void AEMRTransitionSync::trans100u()
+{
+ gpio.led_on(1);
+ arch.delay_us(100);
+ gpio.led_off(1);
+}
+
+void AEMRTransitionSync::trans1m()
+{
+ gpio.led_on(1);
+ arch.delay_ms(1);
+ gpio.led_off(1);
+}
+
+void AEMRTransitionSync::trans2m()
+{
+ gpio.led_on(1);
+ arch.delay_ms(2);
+ gpio.led_off(1);
+}
+
+void AEMRTransitionSync::trans5m()
+{
+ gpio.led_on(1);
+ arch.delay_ms(5);
+ gpio.led_off(1);
+}
+
+void AEMRTransitionSync::trans10m()
+{
+ gpio.led_on(1);
+ arch.delay_ms(10);
+ gpio.led_off(1);
+}
+
+AEMRTransitionSync aemrTransitionSync;