summaryrefslogtreecommitdiff
path: root/src/driver/aemr_transition_sync.cc
blob: 38e47fde0e9851bbd3a934442c0d37cbf706f69e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 * Copyright 2020 Daniel Friesel
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */
#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;