From dae84b7e7f6290ff96cc41b59cab268243063c76 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 30 Nov 2020 13:50:04 +0100 Subject: add aemr_transition_sync driver (for evaluation purposes only) --- src/driver/aemr_transition_sync.cc | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/driver/aemr_transition_sync.cc (limited to 'src') 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; -- cgit v1.2.3