-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
36 lines (33 loc) · 846 Bytes
/
main.c
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
//
// Author: Santiago Romaní Also
//
short tics; // contador de impulsos del timer
short tiempo; // número de intervalos de 5 centésimas (0-200)
short flujo; // nivel de flujo instantáneo (0-30)
char actualizar = 0; // indica si hay que actualizar el gráfico
char estado = 0; // indica el estado anterior del bit0
int main()
{
inicializar_timer0();
do
{
do
{
swiWaitForVBlank();
scanKeys();
} while (!(keysDown() & KEY_START));
tics = 0;
tiempo = 0;
dibujar_ejes();
do
{
swiWaitForVBlank();
if (actualizar)
{
actualizar = 0;
actualizar_grafico();
}
} while (tiempo < 200);
} while (1);
return(0);
}