Project

General

Profile

Revision 193

added get and reset functions back in to work with existing code, added get from a particular function, and reset all

View differences:

main.c
1 1
#include <dragonfly_lib.h>
2 2

  
3
void a1()
4
{
5
	usb_puts("a\n");
6
}
7

  
8
void a2()
9
{
10
	usb_puts("b\n");
11
}
12

  
13
void a3()
14
{
15
	usb_puts("c\n");
16
}
17

  
18
void a4()
19
{
20
	usb_puts("4\n");
21
}
22

  
23
void a5()
24
{
25
	usb_puts("5\n");
26
}
27

  
28
void a6()
29
{
30
	usb_puts("6\n");
31
}
32

  
33
void a7()
34
{
35
	usb_puts("7\n");
36
}
37

  
38
void a8()
39
{
40
	usb_puts("8\n");
41
}
42

  
43
void a9()
44
{
45
	usb_puts("9\n");
46
}
47

  
48
void a10()
49
{
50
usb_puts("A");
51
for(int i = 0; i <10; i++)
52
{
53
	buzzer_chirp(1000,C4);
54
	buzzer_chirp(1000,C5);
55
}
56
}
57

  
3 58
int main(void)
4 59
{
5 60
	dragonfly_init(ALL_ON);
61
	buzzer_init();
62
	void (*functions[])(void) = {a1,a2,a3,a4,a5,a6,a7,a8,a9,a10};
63
	int test[] = {1,2,3,4,5,6,7,8,9,1000};
64
	rtc_multi_init(test, functions, 10);
65
	
66
	while(1){};
67
	
6 68
	return 0;
69
	
7 70
}
8 71

  

Also available in: Unified diff